diff options
author | Ewald Hew <ewaldhew@gmail.com> | 2017-07-24 11:41:14 +0800 |
---|---|---|
committer | Ewald Hew <ewaldhew@gmail.com> | 2017-08-21 14:17:43 +0800 |
commit | f69fcb0ede4b8234e205ab1c4895f9019c6917dc (patch) | |
tree | 752afa6b51138b0a7f3c0edfb4c0484a7def0442 /src/psaux/psintrp.c | |
parent | 1252a41976dc6ca7bd7941a915328e6251bc0096 (diff) | |
download | freetype2-f69fcb0ede4b8234e205ab1c4895f9019c6917dc.tar.gz |
[psaux] Extend Adobe interpreter. (callsubr)
* src/psaux/psintrp.c (cf2_interpT2CharString)
<callsubr>: Type 1 mode.
* src/psaux/psft.c (cf2_initLocalRegionBuffer): Add Type 1 mode.
Diffstat (limited to 'src/psaux/psintrp.c')
-rw-r--r-- | src/psaux/psintrp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/psaux/psintrp.c b/src/psaux/psintrp.c index 34607ca43..7ee3a2546 100644 --- a/src/psaux/psintrp.c +++ b/src/psaux/psintrp.c @@ -975,7 +975,8 @@ FT_TRACE4(( op1 == cf2_cmdCALLGSUBR ? " callgsubr" : " callsubr" )); - if ( charstringIndex > CF2_MAX_SUBR ) + if ( ( !font->isT1 && charstringIndex > CF2_MAX_SUBR ) || + ( font->isT1 && charstringIndex > T1_MAX_SUBRS_CALLS ) ) { /* max subr plus one for charstring */ lastError = FT_THROW( Invalid_Glyph_Format ); @@ -991,10 +992,10 @@ /* set up the new CFF region and pointer */ subrNum = cf2_stack_popInt( opStack ); - if ( font->isT1 && decoder->subrs_hash ) + if ( font->isT1 && decoder->locals_hash ) { size_t* val = ft_hash_num_lookup( subrNum, - decoder->subrs_hash ); + decoder->locals_hash ); if ( val ) subrNum = *val; |