Skip to content

Commit 9e2cd68

Browse files
authored
Merge pull request #45 from derwind/fix-space-unicodes
Fix that space glyph's unicodes could be empty
2 parents fb8898c + 99a57c8 commit 9e2cd68

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/extractor/formats/opentype.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,8 @@ def extractOpenTypeGlyphs(source, destination):
544544
sourceGlyph.draw(pen)
545545
# width
546546
destinationGlyph.width = sourceGlyph.width
547+
# unicodes
548+
destinationGlyph.unicodes = list(reversedMapping.get(glyphName, []))
547549
# height and vertical origin
548550
if vmtx is not None and glyphName in vmtx.metrics:
549551
destinationGlyph.height = vmtx[glyphName][0]
@@ -560,8 +562,6 @@ def extractOpenTypeGlyphs(source, destination):
560562
continue
561563
xMin, yMin, xMax, yMax = bounds_pen.bounds
562564
destinationGlyph.verticalOrigin = tsb + yMax
563-
# unicodes
564-
destinationGlyph.unicodes = list(reversedMapping.get(glyphName, []))
565565

566566

567567
# -------

0 commit comments

Comments
 (0)