From 2b20d1e641a9b036d04d0e9239f2dc8ea9ede377 Mon Sep 17 00:00:00 2001 From: Ewald Hew Date: Wed, 3 Jan 2018 10:32:53 +0800 Subject: [PATCH] off hinting if too many stems --- src/psaux/pshints.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/psaux/pshints.c b/src/psaux/pshints.c index b53ca6745..31cca146d 100644 --- a/src/psaux/pshints.c +++ b/src/psaux/pshints.c @@ -843,7 +843,15 @@ cf2_arrstack_size( hStemHintArray ) + cf2_arrstack_size( vStemHintArray ) ); if ( !cf2_hintmask_isValid( hintMask ) ) + { + if ( font->isT1 ) + { + /* no error, just continue unhinted */ + *hintMask->error = FT_Err_Ok; + hintmap->hinted = FALSE; + } return; /* too many stem hints */ + } } /* begin by clearing the map */ @@ -858,7 +866,7 @@ bitCount = cf2_arrstack_size( hStemHintArray ); /* Defense-in-depth. Should never return here. */ - if ( bitCount > hintMask->bitCount ) + if ( bitCount > hintMask->bitCount && !font->isT1 ) return; /* synthetic embox hints get highest priority */ -- 2.11.0