Skip to content

Commit

Permalink
Better fallback for kerning info extraction
Browse files Browse the repository at this point in the history
"GPOS" might exist but hold no kerning-related data. This will attempt extracting kerning data from "kern" in such case.
  • Loading branch information
rimas-kudelis authored Aug 27, 2024
1 parent d3e83b9 commit 739b1c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/extractor/formats/opentype.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def extractOpenTypeKerning(source, destination):
groups = {}
if "GPOS" in source:
kerning, groups = _extractOpenTypeKerningFromGPOS(source)
elif "kern" in source:
if kerning == {} and "kern" in source:
kerning = _extractOpenTypeKerningFromKern(source)
groups = {}
for name, group in groups.items():
Expand Down

0 comments on commit 739b1c2

Please sign in to comment.