diff --git a/src/fontra/backends/opentype.py b/src/fontra/backends/opentype.py index fe57fea54..51bd04521 100644 --- a/src/fontra/backends/opentype.py +++ b/src/fontra/backends/opentype.py @@ -42,7 +42,7 @@ async def getGlyph(self, glyphName): return None defaultLayerName = "" glyph = VariableGlyph(glyphName) - staticGlyph = serializeGlyph(self.glyphSet, glyphName) + staticGlyph = buildStaticGlyph(self.glyphSet, glyphName) layers = {defaultLayerName: Layer(glyph=staticGlyph)} defaultLocation = {axis.name: 0 for axis in self.globalAxes} sources = [ @@ -59,7 +59,7 @@ async def getGlyph(self, glyphName): if varGlyphSet is None: varGlyphSet = self.font.getGlyphSet(location=fullLoc, normalized=True) self.variationGlyphSets[locStr] = varGlyphSet - varGlyph = serializeGlyph(varGlyphSet, glyphName) + varGlyph = buildStaticGlyph(varGlyphSet, glyphName) layers[locStr] = Layer(glyph=varGlyph) sources.append(Source(location=fullLoc, name=locStr, layerName=locStr)) if self.charStrings is not None: @@ -173,7 +173,7 @@ def unpackAxes(font): return axisList -def serializeGlyph(glyphSet, glyphName): +def buildStaticGlyph(glyphSet, glyphName): pen = PackedPathPointPen() ttGlyph = glyphSet[glyphName] ttGlyph.drawPoints(GuessSmoothPointPen(pen))