[gentium-commits] [SCM] gentium updated: r79 - trunk/gentium/source/fonts/gentium-tug/type1

Pavel Far?? INVALID.NOREPLY at gnu.org.ua
Sat Apr 2 22:18:16 CEST 2022


Author: pavel
Date: 2022-04-02 20:18:16 +0000 (Sat, 02 Apr 2022)
New Revision: 79

Modified:
   trunk/gentium/source/fonts/gentium-tug/type1/kerncorrection.py
Log:
skip Cyrillic kerns if the corresponding Latin kern is missing

The Cyrillic kerning pairs are based on the similar looking Latin
kerning pairs. However, not all fonts have all the Latin kerning
pairs that are used for creating Cyrillic kerning pairs. If the
Latin kern is missing, don't create the Cyrillic kern.

For example the regular and bold fonts have Latin kerning pair
'x o', but the italic and italic bold fonts don't have such pair.


Modified: trunk/gentium/source/fonts/gentium-tug/type1/kerncorrection.py
===================================================================
--- trunk/gentium/source/fonts/gentium-tug/type1/kerncorrection.py	2022-04-02 17:08:54 UTC (rev 78)
+++ trunk/gentium/source/fonts/gentium-tug/type1/kerncorrection.py	2022-04-02 20:18:16 UTC (rev 79)
@@ -341,6 +341,11 @@
             basekern = x[0]
             derivedkerns = x[1:]
             a = fromreader.getkerns("KPX " + basekern + " ")
+
+            # skip the Cyrillic kerns if the corresponding Latin kern is not found
+            if not a:
+                continue
+
             kernline = a[0]
             for b in derivedkerns:
                 first_char, second_char = b.split()



More information about the gentium-commits mailing list.