shithub: freetype+ttf2subf

Download patch

ref: 215bf444380dd706a72c2d1037f827396e735791
parent: fd5770b359bcfb359401c15b1c1bb40381352008
author: Werner Lemberg <[email protected]>
date: Wed Aug 21 13:36:20 EDT 2002

* src/truetype/ttgload.c (TT_Get_Metrics): Add guard for k = 0.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,16 +1,20 @@
-2002-08-20  David Turner   <[email protected]>
+2002-08-20  Werner Lemberg  <[email protected]>
 
-	* src/pshinter/pshalgo1.c, src/pshinter/pshalog2.c, 
+	* src/truetype/ttgload.c (TT_Get_Metrics): Add guard for k = 0.
+
+2002-08-20  David Turner  <[email protected]>
+
+	* src/pshinter/pshalgo1.c, src/pshinter/pshalgo2.c,
 	src/pshinter/pshglob.c, src/pshinter/pshrec.c,
-	src/autohint/ahmodule.c: removing compiler warnings with
-	DEBUG_HINTER defined (only used in development builds anyway)
+	src/autohint/ahmodule.c [DEBUG_HINTER]: Removing compiler warnings
+	(only used in development builds anyway).
 
-	* src/pshinter/pshalgo3.h, src/pshinter/pshalgo3.c: removing
+	* src/pshinter/pshalgo3.h, src/pshinter/pshalgo3.c: Removing
 	compiler warnings, and improving the support of local extrema
-	and stem edge points
+	and stem edge points.
 
-	* test/gview.c: small updates to the hinting debugger
-	* Jamfile: small updates
+	* test/gview.c: Small updates to the hinting debugger.
+	* Jamfile: Small updates.
 
 2002-08-18  Arkadiusz Miskiewicz  <[email protected]>
 
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -93,6 +93,12 @@
     FT_UShort       k = header->number_Of_HMetrics;
 
 
+    if (k == 0)
+    {
+      *bearing = *advance = 0;
+      return;
+    }
+
     if ( idx < (FT_UInt)k )
     {
       longs_m  = (TT_LongMetrics )header->long_metrics + idx;