From 739b1c26364f10c42d446119d2c6b87da515b073 Mon Sep 17 00:00:00 2001 From: Rimas Kudelis Date: Tue, 27 Aug 2024 21:27:16 +0300 Subject: [PATCH] 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. --- Lib/extractor/formats/opentype.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/extractor/formats/opentype.py b/Lib/extractor/formats/opentype.py index a5df7d7..8b9845d 100644 --- a/Lib/extractor/formats/opentype.py +++ b/Lib/extractor/formats/opentype.py @@ -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():