Commit 0ed9fef032641c30d0398d98a01b69eca1c15224

Roy Tam 2017-05-07T08:32:58

[truetype] More tricky fonts (mainly from Dynalab). * src/truetype/ttobjs.c (tt_check_trickyness_family, tt_check_trickyness_sfnt_ids): Add them.

diff --git a/ChangeLog b/ChangeLog
index 85d0953..b75348a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2017-05-07  Roy Tam  <roytam@gmail.com>
+	    Werner Lemberg  <wl@gnu.org>
+
+	[truetype] More tricky fonts (mainly from Dynalab).
+
+	* src/truetype/ttobjs.c (tt_check_trickyness_family,
+	tt_check_trickyness_sfnt_ids): Add them.
+
 2017-05-07  Werner Lemberg  <wl@gnu.org>
 
 	[truetype] Add tricky font `DLCHayMedium' (from Dynalab).
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 8fa9196..cabac36 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -147,21 +147,42 @@
   {
 
 #define TRICK_NAMES_MAX_CHARACTERS  19
-#define TRICK_NAMES_COUNT           10
+#define TRICK_NAMES_COUNT           17
 
     static const char trick_names[TRICK_NAMES_COUNT]
                                  [TRICK_NAMES_MAX_CHARACTERS + 1] =
     {
+      /*
+         PostScript names are given in brackets if they differ from the
+         family name.  The version numbers, together with the copyright or
+         release year data, are taken from fonts available to the
+         developers.
+
+         Note that later versions of the fonts might be no longer tricky;
+         for example, `MingLiU' version 7.00 (file `mingliu.ttc' from
+         Windows 7) is an ordinary TTC with non-tricky subfonts.
+       */
+
+      "cpop",               /* dftt-p7.ttf; version 1.00, 1992 [DLJGyShoMedium] */
       "DFKaiSho-SB",        /* dfkaisb.ttf */
       "DFKaiShu",
-      "DFKai-SB",           /* kaiu.ttf */
-      "DLCHayMedium",       /* dftt-b5.ttf */
+      "DFKai-SB",           /* kaiu.ttf; version 3.00, 1998 [DFKaiShu-SB-Estd-BF] */
+      "DLC",                /* dftt-m7.ttf; version 1.00, 1993 [DLCMingBold] */
+                            /* dftt-f5.ttf; version 1.00, 1993 [DLCFongSung] */
+      "DLCHayMedium",       /* dftt-b5.ttf; version 1.00, 1993 */
+      "DLCHayBold",         /* dftt-b7.ttf; version 1.00, 1993 */
+      "DLCKaiMedium",       /* dftt-k5.ttf; version 1.00, 1992 */
+      "DLCLiShu",           /* dftt-l5.ttf; version 1.00, 1992 */
+      "DLCRoundBold",       /* dftt-r7.ttf; version 1.00, 1993 */
       "HuaTianKaiTi?",      /* htkt2.ttf */
       "HuaTianSongTi?",     /* htst3.ttf */
-      "Ming(for ISO10646)", /* hkscsiic.ttf & iicore.ttf */
-      "MingLiU",            /* mingliu.ttf & mingliu.ttc */
-      "PMingLiU",           /* mingliu.ttc */
-      "MingLi43",           /* mingli.ttf */
+      "Ming(for ISO10646)", /* hkscsiic.ttf; version 0.12, 2007 [Ming] */
+                            /* iicore.ttf; version 0.07, 2007 [Ming] */
+      "MingLiU",            /* mingliu.ttf */
+                            /* mingliu.ttc; version 3.21, 2001 */
+      "MingMedium",         /* dftt-m5.ttf; version 1.00, 1993 [DLCMingMedium] */
+      "PMingLiU",           /* mingliu.ttc; version 3.21, 2001 */
+      "MingLi43",           /* mingli.ttf; version 1.00, 1992 */
     };
 
     int  nn;
@@ -243,7 +264,7 @@
   tt_check_trickyness_sfnt_ids( TT_Face  face )
   {
 #define TRICK_SFNT_IDS_PER_FACE   3
-#define TRICK_SFNT_IDS_NUM_FACES  18
+#define TRICK_SFNT_IDS_NUM_FACES  19
 
     static const tt_sfnt_id_rec sfnt_id[TRICK_SFNT_IDS_NUM_FACES]
                                        [TRICK_SFNT_IDS_PER_FACE] = {
@@ -267,7 +288,7 @@
         { 0x5A30CA3BUL, 0x00009063UL }, /* fpgm */
         { 0x13A42602UL, 0x0000007EUL }  /* prep */
       },
-      { /* DFKaiShu2 */
+      { /* DFKaiShu, variant */
         { 0x11E5EAD4UL, 0x00000350UL }, /* cvt  */
         { 0xA6E78C01UL, 0x00008998UL }, /* fpgm */
         { 0x13A42602UL, 0x0000007EUL }  /* prep */
@@ -341,6 +362,11 @@
         { 0x00000000UL, 0x00000000UL }, /* cvt  */
         { 0xF055FC48UL, 0x000001C2UL }, /* fpgm */
         { 0x3900DED3UL, 0x00001E18UL }  /* prep */
+      },
+        { /* MINGLI.TTF, 1992 */
+        { 0x00170003UL, 0x00000060UL }, /* cvt  */
+        { 0xDBB4306EUL, 0x000058AAUL }, /* fpgm */
+        { 0xD643482AUL, 0x00000035UL }  /* prep */
       }
     };