shithub: freetype+ttf2subf

Download patch

ref: c017f072e477aa306f6301f7049dbe699613996e
parent: eef90d3d1e6a98cd7b6205f2b41b2ea8789c53b7
author: Werner Lemberg <[email protected]>
date: Mon Jan 2 17:33:42 EST 2012

Fix tracing message for `loca' table.

* src/truetype/ttpload.c (tt_face_get_location): Don't emit a
warning message if the last `loca' entry references an empty glyph.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-01-02  Werner Lemberg  <[email protected]>
+
+	Fix tracing message for `loca' table.
+
+	* src/truetype/ttpload.c (tt_face_get_location): Don't emit a
+	warning message if the last `loca' entry references an empty glyph.
+
 2011-12-10  Werner Lemberg  <[email protected]>
 
 	Add some variable initializations.
@@ -3487,7 +3494,7 @@
 
 ----------------------------------------------------------------------------
 
-Copyright 2010-2011 by
+Copyright 2010-2012 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This file is part of the FreeType project, and may only be used, modified,
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType-specific tables loader (body).                              */
 /*                                                                         */
-/*  Copyright 1996-2002, 2004-2011 by                                      */
+/*  Copyright 1996-2002, 2004-2012 by                                      */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -211,7 +211,7 @@
     }
 
     /* Check broken location data */
-    if ( pos1 >= face->glyf_len )
+    if ( pos1 > face->glyf_len )
     {
       FT_TRACE1(( "tt_face_get_location:"
                   " too large offset=0x%08lx found for gid=0x%04lx,"
@@ -221,7 +221,7 @@
       return 0;
     }
 
-    if ( pos2 >= face->glyf_len )
+    if ( pos2 > face->glyf_len )
     {
       FT_TRACE1(( "tt_face_get_location:"
                   " too large offset=0x%08lx found for gid=0x%04lx,"