[varLib.mutator] Merge with master head.
This commit is contained in:
parent
d2d31e57c8
commit
272244a822
@ -149,7 +149,8 @@ def instantiateVariableFont(varfont, location, inplace=False):
|
|||||||
delta = iup_delta(delta, origCoords, endPts)
|
delta = iup_delta(delta, origCoords, endPts)
|
||||||
coordinates += GlyphCoordinates(delta) * scalar
|
coordinates += GlyphCoordinates(delta) * scalar
|
||||||
_SetCoordinates(varfont, glyphname, coordinates)
|
_SetCoordinates(varfont, glyphname, coordinates)
|
||||||
|
else:
|
||||||
|
glyf = None
|
||||||
if 'cvar' in varfont:
|
if 'cvar' in varfont:
|
||||||
log.info("Mutating cvt/cvar tables")
|
log.info("Mutating cvt/cvar tables")
|
||||||
cvar = varfont['cvar']
|
cvar = varfont['cvar']
|
||||||
@ -246,13 +247,14 @@ def instantiateVariableFont(varfont, location, inplace=False):
|
|||||||
|
|
||||||
|
|
||||||
addidef = False
|
addidef = False
|
||||||
for glyph in glyf.glyphs.values():
|
if glyf:
|
||||||
if hasattr(glyph, "program"):
|
for glyph in glyf.glyphs.values():
|
||||||
instructions = glyph.program.getAssembly()
|
if hasattr(glyph, "program"):
|
||||||
# If GETVARIATION opcode is used in bytecode of any glyph add IDEF
|
instructions = glyph.program.getAssembly()
|
||||||
addidef = any(op.startswith("GETVARIATION") for op in instructions)
|
# If GETVARIATION opcode is used in bytecode of any glyph add IDEF
|
||||||
if addidef:
|
addidef = any(op.startswith("GETVARIATION") for op in instructions)
|
||||||
break
|
if addidef:
|
||||||
|
break
|
||||||
if addidef:
|
if addidef:
|
||||||
log.info("Adding IDEF to fpgm table for GETVARIATION opcode")
|
log.info("Adding IDEF to fpgm table for GETVARIATION opcode")
|
||||||
asm = []
|
asm = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user