shithub: freetype+ttf2subf

Download patch

ref: e0ec6b3d53ef94925d41a4392ed7d5a219aa606b
parent: 5158fbc03d99ef6fd699b453206cdda3205b7d34
author: David Turner <[email protected]>
date: Thu Apr 3 10:52:59 EST 2003

* src/type1/t1load.c (T1_Open_Face): fixed the code to make it handle
   special cases where a font only contains a ".notdef" glyph (happens in
   PDF-embedded fonts !!). Otherwise, FT_Panic was called !

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-04-03  Martin Muskens  <[email protected]>
+
+   * src/type1/t1load.c (T1_Open_Face): fixed the code to make it handle
+   special cases where a font only contains a ".notdef" glyph (happens in
+   PDF-embedded fonts !!). Otherwise, FT_Panic was called !
+
 2003-03-27  David Turner  <[email protected]>
 
    * README: udpated
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -795,7 +795,7 @@
              c != '}' &&
              c != '/' &&
              c != '%' &&
-             ! is_space( c ) 
+             ! is_space( c )
              );
  }
 
@@ -1793,6 +1793,15 @@
             }
           }
       }
+     /* yes, this happens, certain PDF-embedded fonts have only a ".notdef"
+      * glyph defined !
+      */
+      if ( min_char > max_char )
+      {
+        min_char = 0;
+        max_char = loader.encoding_table.max_elems;
+      }
+
       type1->encoding.code_first = min_char;
       type1->encoding.code_last  = max_char;
       type1->encoding.num_chars  = loader.num_chars;