Skip to content

Commit

Permalink
Merge pull request #45 from derwind/fix-space-unicodes
Browse files Browse the repository at this point in the history
Fix that space glyph's unicodes could be empty
  • Loading branch information
benkiel authored Dec 3, 2021
2 parents fb8898c + 99a57c8 commit 9e2cd68
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 9e2cd68

Please sign in to comment.