Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language update #529

Merged
merged 1 commit into from
Jan 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion nototools/data/familyname_and_styles.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# See planning spreadsheet for more info.
# This includes some 'grandfathered' fonts from phase 2,
# This includes some 'legacy' fonts from phase 2,
# might not want to include them.

-- TRBH/CR/RI --
Expand Down
8 changes: 4 additions & 4 deletions nototools/noto_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1504,7 +1504,7 @@ def check_for_intersections_and_off_curve_extrema():
return

if variable:
# ignore these for variable font masters
# ignore these for variable font mains
return

if not tests.check("paths"):
Expand Down Expand Up @@ -1853,7 +1853,7 @@ def check_gpos_and_gsub_tables():
if not tests.check("complex"):
return

whitelist = [
allowlist = [
"Hluw", # Anatolian Hieroglyphs
"Cari", # Carian
"Xsux", # Cuneiform
Expand All @@ -1879,7 +1879,7 @@ def check_gpos_and_gsub_tables():
"Vaii", # Vai
"Yiii", # Yi
]
if font_props.script in whitelist:
if font_props.script in allowlist:
return

if "GPOS" not in font:
Expand Down Expand Up @@ -2483,7 +2483,7 @@ def main():
parser.add_argument(
"-v",
"--variable",
help="do checks appropriate to masters for variable fonts.",
help="do checks appropriate to mains for variable fonts.",
action="store_true",
)

Expand Down
4 changes: 2 additions & 2 deletions nototools/notodiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def main():
)
parser.add_argument(
"-w",
"--whitelist",
"--allowlist",
nargs="+",
default=(),
help="list of one or more glyph names to ignore for "
Expand Down Expand Up @@ -214,7 +214,7 @@ def main():
print(
shape_diff.ShapeDiffFinder.dump(
stats,
args.whitelist,
args.allowlist,
args.out_lines,
include_vals=(args.diff_type in ("area", "area-shape-product")),
multiple_fonts=bool(args.match),
Expand Down
6 changes: 3 additions & 3 deletions nototools/shape_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,12 @@ def build_names(self):
self.names -= set(mismatched.keys())

@staticmethod
def dump(stats, whitelist, out_lines, include_vals, multiple_fonts):
def dump(stats, allowlist, out_lines, include_vals, multiple_fonts):
"""Return the results of run diffs.

Args:
stats: List of tuples with diff data which is sorted and printed.
whitelist: Names of glyphs to exclude from report.
allowlist: Names of glyphs to exclude from report.
out_lines: Number of diff lines to print.
include_vals: Include the values that have been diffed in report.
multiple_fonts: Designates whether stats have been accumulated from
Expand All @@ -346,7 +346,7 @@ def dump(stats, whitelist, out_lines, include_vals, multiple_fonts):

report = []

compared = sorted(s for s in stats["compared"] if s[1] not in whitelist)
compared = sorted(s for s in stats["compared"] if s[1] not in allowlist)
compared.reverse()
fmt = "%s %s"
if include_vals:
Expand Down
8 changes: 4 additions & 4 deletions nototools/update_udhr_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ def parse_index(src_dir):

def fix_index(bcp_to_codes):
"""Take a mapping from bcp47 to a set of file codes, and
select the mappings we want using a whitelist. We return
select the mappings we want using a allowlist. We return
a mapping from one bcp47 code to one file code.

We use this opportunity to validate the whitelist, and if there are
We use this opportunity to validate the allowlist, and if there are
any errors, we fail once we're finished."""
errors = []
used_fixes = set()
Expand Down Expand Up @@ -260,7 +260,7 @@ def fix_index(bcp_to_codes):
print("fix_index had %d errors:" % len(errors))
for e in errors:
print(" ", e)
raise Exception("correct the fixes whitelist")
raise Exception("correct the fixes allowlist")

return result

Expand Down Expand Up @@ -401,7 +401,7 @@ def get_bcp_to_code_attrib_sample(src_dir, ohchr_dir):
1) parse the index.xml file to determine a mapping from bcp47 to code.
the bcp47 code has at least lang and script, and perhaps region/variant.
Multiple codes might share the same bcp47 code.
2) Use a whitelist to fix cases where a bcp47 code maps to multiple codes,
2) Use a allowlist to fix cases where a bcp47 code maps to multiple codes,
either by selecting one code, or assigning a separate bcp47 value
to other codes.
3) Load samples for each bcp47 code using article 1 from the file
Expand Down