Commit cd1afc4ef1f4c278e1cb1f1a2688cdd637a0b297

David Turner 2000-11-09T00:47:05

fixed a bug in "docs/glnames.py" which caused he generation of an invalid Mac names table in the file "src/psnames/pstables.h". This caused FT_Get_Glyph_Name to return invalid glyph names for certain TrueType fonts..

diff --git a/docs/glnames.py b/docs/glnames.py
index f0e6904..5553ceb 100644
--- a/docs/glnames.py
+++ b/docs/glnames.py
@@ -1506,7 +1506,7 @@ def count_extra_glyphs( alist, filter ):
   return extras
 
 
-def dump_mac_indices( file ):
+def dump_mac_indices( file, t1_bias ):
   write = file.write
 
   write( "  static const unsigned short  mac_standard_names[" + \
@@ -1684,7 +1684,7 @@ def main():
   write( "\n" )
 
   # dump mac indices table
-  dump_mac_indices( file )
+  dump_mac_indices( file, t1_bias )
 
   # discard mac names from base list
   base_list = base_list[t1_bias:]
diff --git a/src/psnames/pstables.h b/src/psnames/pstables.h
index 094bc27..7355afc 100644
--- a/src/psnames/pstables.h
+++ b/src/psnames/pstables.h
@@ -1108,40 +1108,9 @@
 
   static const unsigned short  mac_standard_names[259] =
   {
+    31,
     0,
-    0,
-    1,
     1,
-    2,
-    3,
-    4,
-    5,
-    6,
-    7,
-    104,
-    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,
@@ -1149,7 +1118,7 @@
     36,
     37,
     38,
-    39,
+    135,
     40,
     41,
     42,
@@ -1175,7 +1144,7 @@
     62,
     63,
     64,
-    124,
+    65,
     66,
     67,
     68,
@@ -1206,155 +1175,186 @@
     93,
     94,
     95,
-    173,
-    175,
-    177,
-    178,
-    186,
-    189,
-    195,
-    200,
-    203,
-    201,
-    202,
-    205,
+    155,
+    97,
+    98,
+    99,
+    100,
+    101,
+    102,
+    103,
+    104,
+    105,
+    106,
+    107,
+    108,
+    109,
+    110,
+    111,
+    112,
+    113,
+    114,
+    115,
+    116,
+    117,
+    118,
+    119,
+    120,
+    121,
+    122,
+    123,
+    124,
+    125,
+    126,
     204,
     206,
-    207,
-    210,
     208,
     209,
-    211,
-    214,
-    212,
-    213,
-    215,
-    216,
-    219,
     217,
-    218,
     220,
-    222,
-    225,
-    223,
-    224,
-    112,
-    161,
-    97,
-    98,
-    102,
-    116,
-    115,
-    149,
-    165,
-    170,
-    153,
-    125,
-    131,
+    226,
+    231,
+    234,
+    232,
+    233,
+    236,
+    235,
+    237,
+    238,
+    241,
+    239,
+    240,
+    242,
+    245,
+    243,
+    244,
+    246,
+    247,
+    250,
+    248,
+    249,
+    251,
+    253,
+    256,
+    254,
+    255,
+    143,
+    192,
+    128,
+    129,
+    133,
+    147,
+    146,
+    180,
+    196,
+    201,
+    184,
+    156,
+    162,
     2,
-    138,
-    141,
+    169,
+    172,
     3,
-    156,
+    187,
     4,
     5,
-    100,
-    152,
+    131,
+    183,
     6,
     7,
     8,
     9,
     10,
-    139,
-    143,
+    170,
+    174,
     11,
-    144,
-    147,
-    123,
-    96,
-    151,
+    175,
+    178,
+    154,
+    127,
+    182,
     12,
-    101,
+    132,
     13,
     14,
-    106,
-    120,
-    121,
-    15,
-    174,
-    176,
-    191,
-    142,
-    148,
-    111,
     137,
-    105,
-    119,
-    65,
-    8,
-    159,
-    16,
-    227,
-    198,
-    99,
-    103,
-    107,
-    108,
-    109,
-    110,
-    113,
-    17,
-    117,
-    118,
-    122,
-    172,
+    151,
+    152,
+    15,
+    205,
+    207,
+    222,
+    173,
     179,
-    171,
-    180,
-    181,
-    182,
-    183,
-    184,
-    185,
-    187,
-    188,
-    18,
+    142,
+    168,
+    136,
+    150,
+    96,
+    39,
     190,
-    193,
-    194,
-    196,
-    145,
-    126,
-    127,
-    128,
-    129,
+    16,
+    258,
+    229,
     130,
-    132,
-    133,
     134,
-    135,
-    136,
+    138,
+    139,
     140,
-    19,
-    192,
+    141,
+    144,
+    17,
+    148,
+    149,
+    153,
+    203,
+    210,
+    202,
+    211,
+    212,
+    213,
+    214,
+    215,
+    216,
+    218,
+    219,
+    18,
     221,
-    199,
-    228,
-    160,
-    154,
-    167,
-    197,
-    226,
+    224,
+    225,
+    227,
+    176,
     157,
-    162,
-    166,
-    168,
-    150,
-    164,
-    169,
-    155,
     158,
+    159,
+    160,
+    161,
     163,
+    164,
+    165,
+    166,
+    167,
+    171,
+    19,
+    223,
+    252,
+    230,
+    259,
+    191,
+    185,
+    198,
+    228,
+    257,
+    188,
+    193,
+    197,
+    199,
+    181,
+    195,
+    200,
+    186,
+    189,
+    194,
     20,
     21,
     22,