Commit 3445e4f942cd85b673195937bb19a705242b4e55

Werner Lemberg 2010-01-04T15:53:27

Make incremental interface work with TrueType fonts. * src/truetype/ttgload.c (load_truetype_glyph): Don't check `glyf_offset' if incremental interface is used.

diff --git a/ChangeLog b/ChangeLog
index 2e55776..843fbfe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-01-04  Ken Sharp  <ken.sharp@artifex.com>
+
+	Make incremental interface work with TrueType fonts.
+
+	* src/truetype/ttgload.c (load_truetype_glyph): Don't check
+	`glyf_offset' if incremental interface is used.
+
 2009-12-31  Lars Abrahamsson  <wonko@opera.com>
 
 	Make compilation with FT_CONFIG_OPTION_PIC work again.
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 68f4b07..cd11c12 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -4,7 +4,8 @@
 /*                                                                         */
 /*    TrueType Glyph Loader (body).                                        */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,   */
+/*            2010 by                                                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -1277,7 +1278,9 @@
 
     if ( loader->byte_len > 0 )
     {
-      if ( !loader->glyf_offset )
+      /* for the incremental interface, `glyf_offset' is always zero */
+      if ( !loader->glyf_offset                        &&
+           !face->root.internal->incremental_interface )
       {
         FT_TRACE2(( "no `glyf' table but non-zero `loca' entry\n" ));
         error = TT_Err_Invalid_Table;