shithub: freetype+ttf2subf

Download patch

ref: f697866ec2a06fc7fd4ab550ffc81df669e8427e
parent: f993b6a0332e4783e110d97636fcd009add48287
author: Werner Lemberg <[email protected]>
date: Sat Jan 8 15:00:54 EST 2000

Bugfix: prep table is optional.

git/fs: mount .git/fs: mount/attach disallowed
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -202,13 +202,12 @@
     FT_Memory  memory = stream->memory;
     TT_ULong   table_len;
 
+
     FT_TRACE2(( "Font program " ));
 
-    error = TT_Err_Ok;
-
     /* The font program is optional */
     error = face->goto_table( face, TTAG_fpgm, stream, &table_len );
-    if (error)
+    if ( error )
     {
       face->font_program      = NULL;
       face->font_program_size = 0;
@@ -231,10 +230,11 @@
     FT_TRACE2(( "Prep program " ));
 
     error = face->goto_table( face, TTAG_prep, stream, &table_len );
-    if (error)
+    if ( error )
     {
       face->cvt_program      = NULL;
       face->cvt_program_size = 0;
+      error                  = TT_Err_Ok;
 
       FT_TRACE2(( "is missing!\n" ));
     }