shithub: freetype+ttf2subf

Download patch

ref: f89396cb6284954ff98b5dcbfc38e144deccdc83
parent: 2cdc4562f873237f1c77d43540537c7a721d3fd8
author: Dave Arnold <[email protected]>
date: Thu Dec 4 01:17:26 EST 2014

[cff] Modify an FT_ASSERT.

* src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah
bug #43661, the test font `...aspartam.otf' still triggers an
FT_ASSERT.  Since hintmap still works with count==0, ...
(cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to
suppress the assert.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2014-12-04  Dave Arnold  <[email protected]>
 
+	[cff] Modify an FT_ASSERT.
+
+	* src/cff/cf2hints.c (cf2_hintmap_map): After the fix for Savannah
+	bug #43661, the test font `...aspartam.otf' still triggers an
+	FT_ASSERT.  Since hintmap still works with count==0, ...
+	(cf2_glyphpath_lineTo, cf2_glyphpath_curveTo): ... add that term to
+	suppress the assert.
+
+2014-12-04  Dave Arnold  <[email protected]>
+
 	[cff] Fix Savannah bug #43661.
 
 	* src/cff/cf2intrp.c (cf2_interpT2CharString) <cf2_cmdHSTEM,
--- a/src/cff/cf2hints.c
+++ b/src/cff/cf2hints.c
@@ -304,9 +304,6 @@
   cf2_hintmap_map( CF2_HintMap  hintmap,
                    CF2_Fixed    csCoord )
   {
-    FT_ASSERT( hintmap->isValid );  /* must call Build before Map */
-    FT_ASSERT( hintmap->lastIndex < CF2_MAX_HINT_EDGES );
-
     if ( hintmap->count == 0 || ! hintmap->hinted )
     {
       /* there are no hints; use uniform scale and zero offset */
@@ -317,6 +314,7 @@
       /* start linear search from last hit */
       CF2_UInt  i = hintmap->lastIndex;
 
+      FT_ASSERT( hintmap->lastIndex < CF2_MAX_HINT_EDGES );
 
       /* search up */
       while ( i < hintmap->count - 1                  &&
@@ -1694,7 +1692,8 @@
 
     if ( glyphpath->elemIsQueued )
     {
-      FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) );
+      FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) ||
+                 glyphpath->hintMap.count == 0              );
 
       cf2_glyphpath_pushPrevElem( glyphpath,
                                   &glyphpath->hintMap,
@@ -1780,7 +1779,8 @@
 
     if ( glyphpath->elemIsQueued )
     {
-      FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) );
+      FT_ASSERT( cf2_hintmap_isValid( &glyphpath->hintMap ) ||
+                 glyphpath->hintMap.count == 0              );
 
       cf2_glyphpath_pushPrevElem( glyphpath,
                                   &glyphpath->hintMap,