[gentium-commits] [SCM] gentium updated: r59 - trunk/test/type1/Scripts/SplitKerns
Pavel Far??
INVALID.NOREPLY at gnu.org.ua
Sun Mar 27 17:02:42 CEST 2022
Author: pavel
Date: 2022-03-27 15:02:42 +0000 (Sun, 27 Mar 2022)
New Revision: 59
Modified:
trunk/test/type1/Scripts/SplitKerns/split_kerning_pairs.py
Log:
split also extra kerning pairs with small caps
The output files for individual encodings now contain not only base
characters, but also small caps. Small caps were ignored in the script
before (and were generated manually).
Modified: trunk/test/type1/Scripts/SplitKerns/split_kerning_pairs.py
===================================================================
--- trunk/test/type1/Scripts/SplitKerns/split_kerning_pairs.py 2022-03-27 14:09:52 UTC (rev 58)
+++ trunk/test/type1/Scripts/SplitKerns/split_kerning_pairs.py 2022-03-27 15:02:42 UTC (rev 59)
@@ -15,6 +15,8 @@
L7X_OUTPUT_FILE = "kerns-l7x.afm"
REST_OUTPUT_FILE = "kerns-rest.afm"
+SMALL_CAPS_EXTENSION = ".sc"
+
# add one glyph, remove non-glyphs
def add_one_glyph(glyph_line, glyph_list):
if glyph_line.startswith('/.notdef'): # skip .notdef
@@ -48,7 +50,9 @@
open(REST_OUTPUT_FILE, "w") as rest_output_file:
for line in input_file:
- _, first_glyph, second_glyph, _ = line.split()
+ # glyph names with the eventual small caps extension removed
+ _, first_glyph, second_glyph, _ = line.replace(SMALL_CAPS_EXTENSION, "").split()
+
if first_glyph in t1_glyph_names and second_glyph in t1_glyph_names:
t1_output_file.write(line)
elif first_glyph in l7x_glyph_names and second_glyph in l7x_glyph_names:
More information about the gentium-commits
mailing list.