[gentium-commits] [SCM] gentium updated: r75 - in trunk/test/type1: Kerns Scripts Scripts/Sp [more]
Pavel Far??
INVALID.NOREPLY at gnu.org.ua
Thu Mar 31 23:39:13 CEST 2022
Author: pavel
Date: 2022-03-31 21:39:13 +0000 (Thu, 31 Mar 2022)
New Revision: 75
Added:
trunk/test/type1/Kerns/Kerns-T2A/
Modified:
trunk/test/type1/Scripts/Makefile
trunk/test/type1/Scripts/SplitKerns/split_kerning_pairs.py
Log:
split extra kerning pairs also according to T2A encoding
Modified: trunk/test/type1/Scripts/Makefile
===================================================================
--- trunk/test/type1/Scripts/Makefile 2022-03-31 18:24:57 UTC (rev 74)
+++ trunk/test/type1/Scripts/Makefile 2022-03-31 21:39:13 UTC (rev 75)
@@ -69,6 +69,8 @@
mv GentiumPlus-Italic-kerns-l7x.afm ../Kerns/Kerns-L7x
mv GentiumPlus-Regular-kerns-t1.afm ../Kerns/Kerns-T1
mv GentiumPlus-Italic-kerns-t1.afm ../Kerns/Kerns-T1
+ mv GentiumPlus-Regular-kerns-t2a.afm ../Kerns/Kerns-T2A
+ mv GentiumPlus-Italic-kerns-t2a.afm ../Kerns/Kerns-T2A
mv GentiumPlus-Regular-kerns-rest.afm ../Kerns/Kerns-rest
mv GentiumPlus-Italic-kerns-rest.afm ../Kerns/Kerns-rest
Modified: trunk/test/type1/Scripts/SplitKerns/split_kerning_pairs.py
===================================================================
--- trunk/test/type1/Scripts/SplitKerns/split_kerning_pairs.py 2022-03-31 18:24:57 UTC (rev 74)
+++ trunk/test/type1/Scripts/SplitKerns/split_kerning_pairs.py 2022-03-31 21:39:13 UTC (rev 75)
@@ -9,6 +9,7 @@
T1_ENC_NAME = ENC_PATH + 'gentium-ec.enc'
L7X_ENC_NAME = ENC_PATH + 'gentium-l7x.enc'
LGR_ENC_NAME = ENC_PATH + 'gentium-lgr.enc'
+T2A_ENC_NAME = ENC_PATH + 'gentium-t2a.enc'
input_kern_file = sys.argv[1]
@@ -15,6 +16,7 @@
T1_OUTPUT_FILE = "kerns-t1.afm"
L7X_OUTPUT_FILE = "kerns-l7x.afm"
LGR_OUTPUT_FILE = "kerns-lgr.afm"
+T2A_OUTPUT_FILE = "kerns-t2a.afm"
REST_OUTPUT_FILE = "kerns-rest.afm"
SMALL_CAPS_EXTENSION = ".sc"
@@ -69,6 +71,12 @@
if line.startswith('/'):
add_one_glyph(line, lgr_glyph_names)
+# create set with glyphs in T2A
+t2a_glyph_names = set("")
+with open(T2A_ENC_NAME) as t2a_encoding_file:
+ for line in t2a_encoding_file:
+ if line.startswith('/'):
+ add_one_glyph(line, t2a_glyph_names)
# split the kerning file to encodings T1, L7x and rest
@@ -76,6 +84,7 @@
open(T1_OUTPUT_FILE, "w") as t1_output_file, \
open(L7X_OUTPUT_FILE, "w") as l7x_output_file, \
open(LGR_OUTPUT_FILE, "w") as lgr_output_file, \
+ open(T2A_OUTPUT_FILE, "w") as t2a_output_file, \
open(REST_OUTPUT_FILE, "w") as rest_output_file:
for line in input_file:
@@ -88,5 +97,7 @@
l7x_output_file.write(line)
elif first_glyph in lgr_glyph_names and second_glyph in lgr_glyph_names:
lgr_output_file.write(line)
+ elif first_glyph in t2a_glyph_names and second_glyph in t2a_glyph_names:
+ t2a_output_file.write(line)
else:
rest_output_file.write(line)
More information about the gentium-commits
mailing list.