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

Housekeeping #811

Merged
merged 3 commits into from
Oct 6, 2023
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
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,11 @@ jobs:
with:
# pytype currently doesn't work with python >= 3.9
python-version: 3.8
# - name: Install tox
# run: pip install tox
# - name: Run style and typing checks
# run: tox -e lint
test:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: [3.9]
platform: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
Expand Down
1 change: 0 additions & 1 deletion nototools/cmap_block_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ def _list_range(
only_scripts,
details,
):

if limit_cp != start_cp + 1:
range_text = "%04x-%04x" % (start_cp, limit_cp - 1)
else:
Expand Down
1 change: 1 addition & 0 deletions nototools/generate_sample_from_exemplar.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ def get_script_to_exemplar_data_map():
no_latin = True
else:
no_latin = False

# exclude exemplar strings, and restrict to letters and digits
def accept_cp(cp):
if len(cp) != 1:
Expand Down
1 change: 0 additions & 1 deletion nototools/generate_samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,6 @@ def parse_sample_gen(definition):
def generate_samples(
defs_file, out_file, patterns=None, group=False, sep="\t", label=False, sort=False
):

with codecs.open(defs_file, "r", "utf-8") as f:
sample_gen = parse_sample_gen(f.read())
if sample_gen:
Expand Down
5 changes: 0 additions & 5 deletions nototools/generate_website_2_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def check_families(family_map):
and unhinted_members
and len(hinted_members) != len(unhinted_members)
):

# Let's not consider this an error for now. Just drop the members with
# the higher number of fonts, assuming it's a superset of the fonts in the
# smaller set, so that the fonts we provide and display are available to
Expand Down Expand Up @@ -197,7 +196,6 @@ def get_family_id_to_lang_scrs(lang_scrs, script_to_family_ids):
def get_family_id_to_lang_scr_to_sample_key(
family_id_to_lang_scrs, families, lang_scr_to_sample_infos
):

"""For each lang_scr + family combination, determine which sample to use
from those available for the lang_scr. If the family can't display any
of the samples, report an error, the lang will not be added to those
Expand Down Expand Up @@ -417,7 +415,6 @@ def lang_key(lang_scr):


def get_charset_info(charset):

"""Returns an encoding of the charset as pairs of lengths of runs of chars
to skip and chars to include. Each length is written as length - 1 in
hex-- except when length == 1, which is written as the empty string-- and
Expand Down Expand Up @@ -926,7 +923,6 @@ def build_data_json(
family_id_to_regions,
region_to_family_ids,
):

data_obj = collections.OrderedDict()
families_obj = collections.OrderedDict()

Expand Down Expand Up @@ -1074,7 +1070,6 @@ def build_family_json(
css_info,
default_lang_scr,
):

family_obj = collections.OrderedDict()
category = get_css_generic_family(family.name)
if category:
Expand Down
1 change: 0 additions & 1 deletion nototools/hb_input.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ def _inputs_from_gsub(self, name, seen):
return inputs
for lookup_index, lookup in enumerate(gsub.LookupList.Lookup):
for st in lookup.SubTable:

# see if this glyph can be a single-glyph substitution
if lookup.LookupType == 1:
for glyph, subst in st.mapping.items():
Expand Down
1 change: 1 addition & 0 deletions nototools/lang_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from nototools import cldr_data
from nototools import unicode_data


# controls printing of debug/trace information
# normally disabled
def _log(msg):
Expand Down
3 changes: 2 additions & 1 deletion nototools/lint_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ def parse_int_ranges(range_string, is_hex=True, sep=" "):

def write_int_ranges(int_values, in_hex=True, sep=" "):
"""From a set or list of ints, generate a string representation that can
be parsed by parse_int_ranges to return the original values (not order_preserving)."""
be parsed by parse_int_ranges to return the original values (not order_preserving).
"""

if not int_values:
return ""
Expand Down
1 change: 1 addition & 0 deletions nototools/noto_cmap_reqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2671,6 +2671,7 @@ def _generate_script_extra(script_to_chars):
),
]


# This is a utility function that parses the _script_required data
# and spits it out again in the above format. When editing the
# above data, just type in the hex values, then run this to regenerate
Expand Down
1 change: 0 additions & 1 deletion nototools/noto_lint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,6 @@ def check_ul_unicode_range():
proportion_val = os2_table.panose.bProportion
is_mono = proportion_val == 9
if proportion_val <= 1:

warn(
"head/os2/panose/proportion",
"OS/2",
Expand Down
1 change: 0 additions & 1 deletion nototools/subset_font_cmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ def _get_default_options():


def subset_font_cmap(srcname, dstname, exclude=None, include=None, bump_version=True):

opt = _DEFAULT_OPTIONS

font = subset.load_font(srcname, opt)
Expand Down
1 change: 1 addition & 0 deletions nototools/unicode_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ def _load_emoji_data():
]
)


# Unicode 12 decided to be 'helpful' and included single emoji in the sequence
# data, but unlike all the other data represents these in batches as XXXX..XXXX
# rather than one per line. We can't get name data for these so we can't
Expand Down
2 changes: 0 additions & 2 deletions nototools/unittests/font_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ def test_family_name(self):
"""Tests the family name."""

for font_file, records in zip(self.font_files, self.names):

family, weight, _ = self.parse_filename(font_file)

# check that family name includes weight, if not regular or bold
Expand Down Expand Up @@ -398,7 +397,6 @@ def test_num_features(self):
def run_test(
glyph_order, glyph_set, fontfile, tags, proportional=False, oldstyle=False
):

num = glyph_order[layout.get_glyphs("1", fontfile)[0]]
styled = glyph_order[
layout.get_glyphs("1", fontfile, "--features=" + ",".join(tags))[0]
Expand Down
24 changes: 12 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
afdko==3.9.1
afdko==4.0.0
appdirs==1.4.4
attrs==21.4.0
black==22.6.0
attrs==23.1.0
black==23.9.1
booleanOperations==0.9.0
Brotli==1.0.9
click==8.1.3
cu2qu==1.6.7.post1
defcon==0.10.2
fontMath==0.9.2
fontParts==0.10.7
cu2qu==1.6.7.post2
defcon==0.10.3
fontMath==0.9.3
fontParts==0.11.0
fontPens==0.2.4
fonttools==4.34.4
fonttools==4.43.0
fs==2.4.16
lxml==4.9.3
MutatorMath==3.0.1
pathspec>=0.9.0
Pillow==9.2.0
Pillow==10.0.1
psautohint>=2.4.0
pyclipper==1.3.0.post3
pytz==2022.1
pyclipper==1.3.0.post4
pytz==2023.3
regex==2023.10.3
scour==0.38.2
six==1.16.0
toml==0.10.2
typed-ast>=1.4.2
ufonormalizer==0.6.1
ufoProcessor==1.9.0
unicodedata2==14.0.0
unicodedata2==15.0.0
zopfli==0.2.2