Skip to content

Commit 739b1c2

Browse files
Better fallback for kerning info extraction
"GPOS" might exist but hold no kerning-related data. This will attempt extracting kerning data from "kern" in such case.
1 parent d3e83b9 commit 739b1c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/extractor/formats/opentype.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ def extractOpenTypeKerning(source, destination):
578578
groups = {}
579579
if "GPOS" in source:
580580
kerning, groups = _extractOpenTypeKerningFromGPOS(source)
581-
elif "kern" in source:
581+
if kerning == {} and "kern" in source:
582582
kerning = _extractOpenTypeKerningFromKern(source)
583583
groups = {}
584584
for name, group in groups.items():

0 commit comments

Comments
 (0)