shithub: freetype+ttf2subf

Download patch

ref: 7c64409e8662b9d3c14bcc601f2b787373dd4ec1
parent: b8431ed776cbb63cbd60cbc5a52e77a7660183cf
author: Just van Rossum <[email protected]>
date: Tue Aug 1 00:29:25 EDT 2000

Some simple patches that allow synthetic fonts to be rendered. *However*: although the FontMatrix is read correctly, it does _not_ seem to be used! I don't understand this...

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/type1z/z1load.c
+++ b/src/type1z/z1load.c
@@ -1072,6 +1072,10 @@
     FT_Fixed    temp[4];
 
 
+    if ( matrix->xx || matrix->yx )
+      /*  with synthetic fonts, it's possible we get here twice  */
+      return;
+
     (void)Z1_ToFixedArray( parser, 4, temp, 3 );
     matrix->xx = temp[0];
     matrix->yx = temp[1];
@@ -1325,6 +1329,10 @@
     FT_Byte*    limit = parser->limit;
     FT_Int      n;
 
+
+    if ( loader->num_glyphs )
+      /*  with synthetic fonts, it's possible we get here twice  */
+      return;
 
     loader->num_glyphs = Z1_ToInt( parser );
     if ( parser->error )
--- a/src/type1z/z1parse.c
+++ b/src/type1z/z1parse.c
@@ -868,6 +868,10 @@
           FT_Memory  memory = parser->memory;
           FT_UInt    len    = limit-cur;
 
+          if ( *(FT_String**)q )
+            /*  with synthetic fonts, it's possible to find a field twice  */
+            break;
+
           if ( ALLOC( string, len + 1 ) )
             goto Exit;