some updates to allow the selective compilation of the adobe glyph list (this thing is huge !!)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
diff --git a/docs/glnames.py b/docs/glnames.py
index 97f6f13..2efcbb4 100644
--- a/docs/glnames.py
+++ b/docs/glnames.py
@@ -1403,18 +1403,26 @@ def dump_mac_indices():
print ""
-def dump_glyph_list(glyph_list):
+def dump_glyph_list(glyph_list, adobe_extra):
print "static const char* standard_glyph_names[] = {"
for name in glyph_list:
- print ' "'+name+'"'+','
+ print ' "'+name+'",'
+
+ print "#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST"
+ for name in adobe_extra:
+ print ' "'+name+'",'
+
+ print "#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */"
print " 0 };"
print ""
+
def dump_unicode_values(glyph_list):
"""build the glyph names to unicode values table"""
adobe_list, uni_values = the_adobe_glyphs()
index_list = []
-
+
+ print "#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST"
print "static const unsigned short names_to_unicode[" + \
repr(len(glyph_list)+1) + "] = {"
@@ -1428,6 +1436,7 @@ def dump_unicode_values(glyph_list):
print " 0,"
print " 0 };"
+ print "#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */"
print ""
def dump_encoding( encoding_name, encoding_list ):
@@ -1456,20 +1465,22 @@ def main(argv):
adobe_list = count_extra_glyphs( adobe_list, glyph_list )
count_adobe = len(adobe_list)
- glyph_list = glyph_list + adobe_list
-
print "/* the following tables are generated automatically - do not edit */"
print ""
# dump glyph list
- dump_glyph_list( glyph_list )
+ dump_glyph_list( glyph_list, adobe_list )
# dump t1_standard_list
print "static const char** t1_standard_glyphs = standard_glyph_names + " + repr(t1_bias) + ";"
print ""
print "#define NUM_STD_GLYPHS "+repr(len(t1_standard_strings))
print ""
+ print "#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST"
+ print "#define NUM_ADOBE_GLYPHS "+repr(len(glyph_list)+len(adobe_list)-t1_bias)
+ print "#else"
print "#define NUM_ADOBE_GLYPHS "+repr(len(glyph_list)-t1_bias)
+ print "#endif"
print ""
# dump mac indices table