Newer black

This commit is contained in:
Behdad Esfahbod 2024-02-06 15:42:21 -07:00
parent 3bada5de80
commit a1641d91b2
3 changed files with 14 additions and 14 deletions

View File

@ -1930,11 +1930,7 @@ class CFF2Index(BaseConverter):
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)

View File

@ -928,9 +928,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,
),
)

View File

@ -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,
),
)
@ -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