From f89396cb6284954ff98b5dcbfc38e144deccdc83 Mon Sep 17 00:00:00 2001 From: Dave Arnold Date: Thu, 4 Dec 2014 06:17:26 +0100 Subject: [PATCH] [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. --- ChangeLog | 10 ++++++++++ src/cff/cf2hints.c | 10 +++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6a25737cc..3940e2167 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2014-12-04 Dave Arnold + + [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 [cff] Fix Savannah bug #43661. diff --git a/src/cff/cf2hints.c b/src/cff/cf2hints.c index 28a892b2a..040d193f3 100644 --- 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,