[gentium-commits] [SCM] gentium updated: r66 - in trunk/test/type1/Scripts: . MakeKerningPai [more]

Pavel Far?? INVALID.NOREPLY at gnu.org.ua
Mon Mar 28 15:23:45 CEST 2022


Author: pavel
Date: 2022-03-28 13:23:45 +0000 (Mon, 28 Mar 2022)
New Revision: 66

Modified:
   trunk/test/type1/Scripts/MakeKerningPairs/make_kerning_pairs.py
   trunk/test/type1/Scripts/Makefile
   trunk/test/type1/Scripts/README
Log:
automate creating character pairs for testing kerning

Converts extra kerning pairs from afm format to real characters
in text files and encoded in UTF-8. Creates separate file for
small caps.


Modified: trunk/test/type1/Scripts/MakeKerningPairs/make_kerning_pairs.py
===================================================================
--- trunk/test/type1/Scripts/MakeKerningPairs/make_kerning_pairs.py	2022-03-27 21:50:36 UTC (rev 65)
+++ trunk/test/type1/Scripts/MakeKerningPairs/make_kerning_pairs.py	2022-03-28 13:23:45 UTC (rev 66)
@@ -12,12 +12,13 @@
 import sys
 import textwrap
 
-ADOBE_GLYPH_LIST = 'glyphlist.txt'
+# the script is called from the parent directory
+ADOBE_GLYPH_LIST = 'MakeKerningPairs/glyphlist.txt'
 
 input_kerning_name = sys.argv[1]
 
-OUTPUT_REGULAR_NAME = "kerntest.txt"
-OUTPUT_SMALLCAPS_NAME = "kerntest-sc.txt"
+OUTPUT_REGULAR_NAME = input_kerning_name.removesuffix('.afm') + ".txt"
+OUTPUT_SMALLCAPS_NAME = input_kerning_name.removesuffix('.afm') + "-SmallCaps.txt"
 LINE_LENGTH = 74
 SMALLCAPS_EXTENSION = '.sc'
 

Modified: trunk/test/type1/Scripts/Makefile
===================================================================
--- trunk/test/type1/Scripts/Makefile	2022-03-27 21:50:36 UTC (rev 65)
+++ trunk/test/type1/Scripts/Makefile	2022-03-28 13:23:45 UTC (rev 66)
@@ -82,3 +82,11 @@
 		echo '*' $$i $${i/-ttf/}; \
 		diff $$i $${i/-ttf/}; \
 	done
+
+pairs: split-kerns
+	# make text files with pairs of characters for testing kerning
+	find ../Kerns -name 'GentiumPlus-*-kerns-*.afm' | xargs -n 1 MakeKerningPairs/make_kerning_pairs.py
+
+pairs-clean:
+	# delete temporary files created by 'pairs'
+	$$(find ../Kerns -name 'GentiumPlus-*-kerns-*.txt' -delete)

Modified: trunk/test/type1/Scripts/README
===================================================================
--- trunk/test/type1/Scripts/README	2022-03-27 21:50:36 UTC (rev 65)
+++ trunk/test/type1/Scripts/README	2022-03-28 13:23:45 UTC (rev 66)
@@ -72,7 +72,16 @@
 split-kerns-clean
   Remove files generated by 'make split-kerns'.
 
+pairs
+  Generate text files with pairs of characters that will be used for testing
+  the extra kerning pairs. It takes the afm files created by the target
+  split-kerns and creates two files (regular and small caps) for each input
+  file.
 
+pairs-clean
+  Remove files generated by 'make pairs'.
+
+
 Remarks
 =======
 



More information about the gentium-commits mailing list.