Skip to content

Commit

Permalink
fix that space glyph's unicodes could be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
derwind committed Dec 3, 2021
1 parent b44d9b8 commit 99a57c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/extractor/formats/opentype.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,8 @@ def extractOpenTypeGlyphs(source, destination):
sourceGlyph.draw(pen)
# width
destinationGlyph.width = sourceGlyph.width
# unicodes
destinationGlyph.unicodes = list(reversedMapping.get(glyphName, []))
# height and vertical origin
if vmtx is not None and glyphName in vmtx.metrics:
destinationGlyph.height = vmtx[glyphName][0]
Expand All @@ -560,8 +562,6 @@ def extractOpenTypeGlyphs(source, destination):
continue
xMin, yMin, xMax, yMax = bounds_pen.bounds
destinationGlyph.verticalOrigin = tsb + yMax
# unicodes
destinationGlyph.unicodes = list(reversedMapping.get(glyphName, []))


# -------
Expand Down

0 comments on commit 99a57c8

Please sign in to comment.