Commit 9f8309f12a8e19b13327f22c99784ef9f658779a

Werner Lemberg 2004-07-24T21:57:39

* src/truetype/ttobjs.c (tt_face_init): Accept 0x00020000 format tag found in some Arphic fonts made for Chinese version of Windows 3.1.

diff --git a/ChangeLog b/ChangeLog
index 5ae1a9c..55647cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-23  Werner Lemberg  <wl@gnu.org>
+
+	* src/truetype/ttobjs.c (tt_face_init): Accept 0x00020000 format tag
+	found in some Arphic fonts made for Chinese version of Windows 3.1.
+
 2004-07-17  David Turner  <david@freetype.org>
 
 	Fixed a dangling pointer bug in the cache code that happened in very
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 3914ba5..b606ace 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -190,8 +190,11 @@
     if ( error )
       goto Exit;
 
-    /* We must also be able to accept Mac/GX fonts, as well as OT ones */
+    /* We must also be able to accept Mac/GX fonts, as well as OT ones. */
+    /* The 0x00020000 tag is completely undocumented; some fonts from   */
+    /* Arphic made for Chinese Windows 3.1 have this.                   */
     if ( face->format_tag != 0x00010000L &&    /* MS fonts  */
+         face->format_tag != 0x00020000L &&    /* CJK fonts for Win 3.1 */
          face->format_tag != TTAG_true   )     /* Mac fonts */
     {
       FT_TRACE2(( "[not a valid TTF font]\n" ));