File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -317,6 +317,7 @@ def extractOpenTypeGlyphs(source, destination):
317317 vmtx = source .get ("vmtx" )
318318 vorg = source .get ("VORG" )
319319 cmap = source .getBestCmap ()
320+ is_ttf = "glyf" in source
320321 reversedMapping = source .get ("cmap" ).buildReversed ()
321322 # grab the glyphs
322323 glyphSet = source .getGlyphSet ()
@@ -326,8 +327,12 @@ def extractOpenTypeGlyphs(source, destination):
326327 destination .newGlyph (glyphName )
327328 destinationGlyph = destination [glyphName ]
328329 # outlines
329- pen = destinationGlyph .getPen ()
330- sourceGlyph .draw (pen )
330+ if is_ttf :
331+ pen = destinationGlyph .getPointPen ()
332+ sourceGlyph .drawPoints (pen )
333+ else :
334+ pen = destinationGlyph .getPen ()
335+ sourceGlyph .draw (pen )
331336 # width
332337 destinationGlyph .width = sourceGlyph .width
333338 # height and vertical origin
You can’t perform that action at this time.
0 commit comments