[instancer] bug fix
It's possible that length of all_points equals to 4 for non-empty glyphs: a composite glyph which contains only one child glyph that is empty.
This commit is contained in:
parent
8302da8630
commit
af1e605be2
|
@ -119,7 +119,7 @@ struct Glyph
|
||||||
hb_bytes_t &dest_bytes /* OUT */) const
|
hb_bytes_t &dest_bytes /* OUT */) const
|
||||||
{
|
{
|
||||||
GlyphHeader *glyph_header = nullptr;
|
GlyphHeader *glyph_header = nullptr;
|
||||||
if (!plan->pinned_at_default && type != EMPTY && all_points.length > 4)
|
if (!plan->pinned_at_default && type != EMPTY && all_points.length >= 4)
|
||||||
{
|
{
|
||||||
glyph_header = (GlyphHeader *) hb_calloc (1, GlyphHeader::static_size);
|
glyph_header = (GlyphHeader *) hb_calloc (1, GlyphHeader::static_size);
|
||||||
if (unlikely (!glyph_header)) return false;
|
if (unlikely (!glyph_header)) return false;
|
||||||
|
|
|
@ -63,6 +63,7 @@ EXTRA_DIST += \
|
||||||
expected/pin_all_at_default \
|
expected/pin_all_at_default \
|
||||||
expected/instance_no_double_free \
|
expected/instance_no_double_free \
|
||||||
expected/mvar_full_instance \
|
expected/mvar_full_instance \
|
||||||
|
expected/instance_comp_glyph_empty_child \
|
||||||
fonts \
|
fonts \
|
||||||
profiles \
|
profiles \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
|
@ -54,6 +54,7 @@ TESTS = \
|
||||||
tests/pin_all_at_default.tests \
|
tests/pin_all_at_default.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 \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
# TODO: re-enable once colrv1 subsetting is stabilized.
|
# TODO: re-enable once colrv1 subsetting is stabilized.
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,11 @@
|
||||||
|
FONTS:
|
||||||
|
RobotoMono.ttf
|
||||||
|
|
||||||
|
PROFILES:
|
||||||
|
default.txt
|
||||||
|
|
||||||
|
SUBSETS:
|
||||||
|
*
|
||||||
|
|
||||||
|
INSTANCES:
|
||||||
|
wght=700
|
|
@ -56,6 +56,7 @@ tests = [
|
||||||
'instance_feature_variations',
|
'instance_feature_variations',
|
||||||
'instance_no_double_free',
|
'instance_no_double_free',
|
||||||
'mvar_full_instance',
|
'mvar_full_instance',
|
||||||
|
'instance_comp_glyph_empty_child',
|
||||||
]
|
]
|
||||||
|
|
||||||
repack_tests = [
|
repack_tests = [
|
||||||
|
|
Loading…
Reference in New Issue