From cf9e7a6d845745d0fd97083633782db6bf297d6a Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Wed, 3 Sep 2014 01:27:37 +0200 Subject: [PATCH] Fix maxStorage computation. We need access to the SAL even if glyphs are scaled only. Problem reported by Vitaly Puzrin . --- lib/tabytecode.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/tabytecode.c b/lib/tabytecode.c index ed5a820..63c5735 100644 --- a/lib/tabytecode.c +++ b/lib/tabytecode.c @@ -873,6 +873,7 @@ TA_sfnt_build_glyph_scaler(SFNT* sfnt, FT_Bool need_words = 0; FT_Int p, q; FT_Int start, end; + FT_UShort num_storage; FT_UShort num_stack_elements; @@ -939,6 +940,10 @@ TA_sfnt_build_glyph_scaler(SFNT* sfnt, BCI(CALL); + num_storage = sal_segment_offset; + if (num_storage > sfnt->max_storage) + sfnt->max_storage = num_storage; + num_stack_elements = ADDITIONAL_STACK_ELEMENTS + num_args; if (num_stack_elements > sfnt->max_stack_elements) sfnt->max_stack_elements = num_stack_elements; -- 2.11.4.GIT