[gs-cvs] rev 9590 - branches/freetype-2.3.9-gs/src/truetype

giles at ghostscript.com giles at ghostscript.com
Tue Mar 24 17:55:23 PDT 2009


Author: giles
Date: 2009-03-24 17:55:22 -0700 (Tue, 24 Mar 2009)
New Revision: 9590

Modified:
   branches/freetype-2.3.9-gs/src/truetype/ttgload.c
Log:
Fix FreeType incremental interface. the test in ttgload.c against 
'glyf_offset' being 0 seems incorrect, if the first glyph is called
for then the offset should be zero.

Removing the test causes the two test files '0000728-simpleNG.pdf' and
'067a_unc-stroke.pdf' to work correctly. This needs to be forwarded to 
the FreeTypemaintainer(s) for their review and input, we may need to 
supply the two PDF files as well.

NB This only occurs if using the FreeType incremental font interface!

Patch by Ken Sharp. Corresponds to c9530 on top of 2.3.8.


Modified: branches/freetype-2.3.9-gs/src/truetype/ttgload.c
===================================================================
--- branches/freetype-2.3.9-gs/src/truetype/ttgload.c	2009-03-25 00:53:19 UTC (rev 9589)
+++ branches/freetype-2.3.9-gs/src/truetype/ttgload.c	2009-03-25 00:55:22 UTC (rev 9590)
@@ -1245,12 +1245,19 @@
 
     if ( loader->byte_len > 0 )
     {
-      if ( !loader->glyf_offset )
+	/* Following code removed because the test seems bogus. Why should the 
+	 * glyf_offset not be 0, if its the first glyph ? 
+	 * Files "0000728-simpleNG.pdf" and "067a_unc-stroke.pdf" fail with this
+	 * test in place, work correctly with it removed.
+	 */
+#if 0
+	if ( !loader->glyf_offset )
       {
         FT_TRACE2(( "no `glyf' table but non-zero `loca' entry!\n" ));
         error = TT_Err_Invalid_Table;
         goto Exit;
       }
+#endif
 
       error = face->access_glyph_frame( loader, glyph_index,
                                         loader->glyf_offset + offset,



More information about the gs-cvs mailing list