shithub: freetype+ttf2subf

Download patch

ref: c2278680e741e0225fd6f32c367b433bff9e025d
parent: 4b9a7f6bffb3fdbcf3b0ec5597e8b4c0d1062403
author: David Turner <[email protected]>
date: Sat Nov 23 10:53:57 EST 2002

* src/cff/cffload.c (cff_charser_load): modified charset loader to
        accept pre-defined charsets, even when the font contains fewer glyphs

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2002-11-23  David Turner  <[email protected]>
+
+        * src/cff/cffload.c (cff_charser_load): modified charset loader to
+        accept pre-defined charsets, even when the font contains fewer glyphs
+
+2002-11-18  David Turner  <[email protected]>
+
+        * FreeType 2.1.3 is released
+        ============================
+
 2002-11-07  David Turner  <[email protected]>
 
         * src/cache/ftcsbit.c (ftc_sbit_node_load): fixed a small bug that caused
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -1595,8 +1595,7 @@
       /* In order to use a predefined charset, the following must be  */
       /* true: The charset constructed for the glyphs in the font's   */
       /* charstrings dictionary must match the predefined charset in  */
-      /* the first num_glyphs, and hence must match the predefined    */
-      /* charset *exactly*.                                           */
+      /* the first num_glyphs                                         */
 
       charset->offset = offset;  /* record charset type */
 
@@ -1603,9 +1602,9 @@
       switch ( (FT_UInt)offset )
       {
       case 0:
-        if ( num_glyphs != 229 )
+        if ( num_glyphs > 229 )
         {
-          FT_ERROR(("cff_charset_load: implicit charset not equal to\n"
+          FT_ERROR(("cff_charset_load: implicit charset larger than\n"
                     "predefined charset (Adobe ISO-Latin)!\n" ));
           error = CFF_Err_Invalid_File_Format;
           goto Exit;
@@ -1622,9 +1621,9 @@
         break;
 
       case 1:
-        if ( num_glyphs != 166 )
+        if ( num_glyphs > 166 )
         {
-          FT_ERROR(( "cff_charset_load: implicit charset not equal to\n"
+          FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
                      "predefined charset (Adobe Expert)!\n" ));
           error = CFF_Err_Invalid_File_Format;
           goto Exit;
@@ -1641,9 +1640,9 @@
         break;
 
       case 2:
-        if ( num_glyphs != 87 )
+        if ( num_glyphs > 87 )
         {
-          FT_ERROR(( "cff_charset_load: implicit charset not equal to\n"
+          FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
                      "predefined charset (Adobe Expert Subset)!\n" ));
           error = CFF_Err_Invalid_File_Format;
           goto Exit;