[varLib, fontBuilder] Set Private.vstore as well
Otherwise T2OutlineExtractor.op_blend() would raise and exception unless the font is saved and loaded again.
This commit is contained in:
parent
38981b6dae
commit
366c08a9d6
@ -602,7 +602,10 @@ class FontBuilder(object):
|
||||
varData = buildVarData(list(range(len(regions))), None, optimize=False)
|
||||
varStore = buildVarStore(varRegionList, [varData])
|
||||
vstore = VarStoreData(otVarStore=varStore)
|
||||
self.font["CFF2"].cff.topDictIndex[0].VarStore = vstore
|
||||
topDict = self.font["CFF2"].cff.topDictIndex[0]
|
||||
topDict.VarStore = vstore
|
||||
for fontDict in topDict.FDArray:
|
||||
fontDict.Private.vstore = vstore
|
||||
|
||||
def setupGlyf(self, glyphs, calcGlyphBounds=True):
|
||||
"""Create the `glyf` table from a dict, that maps glyph names
|
||||
|
@ -30,6 +30,11 @@ def addCFFVarStore(varFont, varModel, varDataList, masterSupports):
|
||||
|
||||
topDict = varFont['CFF2'].cff.topDictIndex[0]
|
||||
topDict.VarStore = VarStoreData(otVarStore=varStoreCFFV)
|
||||
if topDict.FDArray[0].vstore is None:
|
||||
fdArray = topDict.FDArray
|
||||
for fontDict in fdArray:
|
||||
if hasattr(fontDict, "Private"):
|
||||
fontDict.Private.vstore = topDict.VarStore
|
||||
|
||||
|
||||
def lib_convertCFFToCFF2(cff, otFont):
|
||||
|
Loading…
x
Reference in New Issue
Block a user