Skip to content

Commit

Permalink
Newer black
Browse files Browse the repository at this point in the history
  • Loading branch information
behdad committed Mar 16, 2024
1 parent a44aada commit 2d529fb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
6 changes: 1 addition & 5 deletions Lib/fontTools/ttLib/tables/otConverters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1928,11 +1928,7 @@ def write(self, writer, font, tableDict, values, repeatIndex=None):
offSize = (
1
if lastOffset < 0x100
else 2
if lastOffset < 0x10000
else 3
if lastOffset < 0x1000000
else 4
else 2 if lastOffset < 0x10000 else 3 if lastOffset < 0x1000000 else 4
)
writer.writeUInt8(offSize)

Expand Down
8 changes: 5 additions & 3 deletions Lib/fontTools/varLib/instancer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,9 +668,11 @@ def instantiateGvar(varfont, axisLimits, optimize=True):
glyphnames = sorted(
glyf.glyphOrder,
key=lambda name: (
glyf[name].getCompositeMaxpValues(glyf).maxComponentDepth
if glyf[name].isComposite()
else 0,
(
glyf[name].getCompositeMaxpValues(glyf).maxComponentDepth
if glyf[name].isComposite()
else 0
),
name,
),
)
Expand Down
14 changes: 8 additions & 6 deletions Lib/fontTools/varLib/mutator.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,11 @@ def instantiateVariableFont(varfont, location, inplace=False, overlap=True):
glyphnames = sorted(
gvar.variations.keys(),
key=lambda name: (
glyf[name].getCompositeMaxpValues(glyf).maxComponentDepth
if glyf[name].isComposite()
else 0,
(
glyf[name].getCompositeMaxpValues(glyf).maxComponentDepth
if glyf[name].isComposite()
else 0
),
name,
),
)
Expand Down Expand Up @@ -305,9 +307,9 @@ def instantiateVariableFont(varfont, location, inplace=False, overlap=True):
if applies:
assert record.FeatureTableSubstitution.Version == 0x00010000
for rec in record.FeatureTableSubstitution.SubstitutionRecord:
table.FeatureList.FeatureRecord[
rec.FeatureIndex
].Feature = rec.Feature
table.FeatureList.FeatureRecord[rec.FeatureIndex].Feature = (
rec.Feature
)
break
del table.FeatureVariations

Expand Down

0 comments on commit 2d529fb

Please sign in to comment.