Newer black
This commit is contained in:
parent
3bada5de80
commit
a1641d91b2
@ -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)
|
||||
|
||||
|
@ -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,
|
||||
),
|
||||
)
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user