[instancer] bug fix in post table applying mvar deltas

This commit is contained in:
Qunxin Liu 2023-02-24 10:17:32 -08:00 committed by Behdad Esfahbod
parent 918193ebf9
commit 605aed0544
7 changed files with 18 additions and 4 deletions

View File

@ -99,6 +99,10 @@ struct post
post *post_prime = c->serializer->start_embed<post> (); post *post_prime = c->serializer->start_embed<post> ();
if (unlikely (!post_prime)) return_trace (false); if (unlikely (!post_prime)) return_trace (false);
bool glyph_names = c->plan->flags & HB_SUBSET_FLAGS_GLYPH_NAMES;
if (!serialize (c->serializer, glyph_names))
return_trace (false);
#ifndef HB_NO_VAR #ifndef HB_NO_VAR
if (c->plan->normalized_coords) if (c->plan->normalized_coords)
{ {
@ -110,10 +114,6 @@ struct post
} }
#endif #endif
bool glyph_names = c->plan->flags & HB_SUBSET_FLAGS_GLYPH_NAMES;
if (!serialize (c->serializer, glyph_names))
return_trace (false);
if (c->plan->user_axes_location.has (HB_TAG ('s','l','n','t')) && if (c->plan->user_axes_location.has (HB_TAG ('s','l','n','t')) &&
!c->plan->pinned_at_default) !c->plan->pinned_at_default)
{ {

View File

@ -65,6 +65,7 @@ EXTRA_DIST += \
expected/instance_no_double_free \ expected/instance_no_double_free \
expected/mvar_full_instance \ expected/mvar_full_instance \
expected/instance_comp_glyph_empty_child \ expected/instance_comp_glyph_empty_child \
expected/post_apply_mvar_delta \
fonts \ fonts \
profiles \ profiles \
$(NULL) $(NULL)

View File

@ -56,6 +56,7 @@ TESTS = \
tests/instance_no_double_free.tests \ tests/instance_no_double_free.tests \
tests/mvar_full_instance.tests \ tests/mvar_full_instance.tests \
tests/instance_comp_glyph_empty_child.tests \ tests/instance_comp_glyph_empty_child.tests \
tests/post_apply_mvar_delta.tests \
$(NULL) $(NULL)
# TODO: re-enable once colrv1 subsetting is stabilized. # TODO: re-enable once colrv1 subsetting is stabilized.

Binary file not shown.

View File

@ -0,0 +1,11 @@
FONTS:
Recursive-ABC.ttf
PROFILES:
no-layout.txt
SUBSETS:
*
INSTANCES:
wght=400,CASL=0,CRSV=0,MONO=0,slnt=0

View File

@ -58,6 +58,7 @@ tests = [
'instance_no_double_free', 'instance_no_double_free',
'mvar_full_instance', 'mvar_full_instance',
'instance_comp_glyph_empty_child', 'instance_comp_glyph_empty_child',
'post_apply_mvar_delta',
] ]
repack_tests = [ repack_tests = [