[subset] inputSequence could be empty, change the sanity check
This commit is contained in:
parent
a75b96f7e5
commit
e88fc41ef3
|
@ -1642,9 +1642,8 @@ struct Rule
|
||||||
const hb_map_t *klass_map = nullptr) const
|
const hb_map_t *klass_map = nullptr) const
|
||||||
{
|
{
|
||||||
TRACE_SUBSET (this);
|
TRACE_SUBSET (this);
|
||||||
|
if (unlikely (!inputCount)) return_trace (false);
|
||||||
const hb_array_t<const HBUINT16> input = inputZ.as_array ((inputCount ? inputCount - 1 : 0));
|
const hb_array_t<const HBUINT16> input = inputZ.as_array (inputCount - 1);
|
||||||
if (!input.length) return_trace (false);
|
|
||||||
|
|
||||||
const hb_map_t *mapping = klass_map == nullptr ? c->plan->glyph_map : klass_map;
|
const hb_map_t *mapping = klass_map == nullptr ? c->plan->glyph_map : klass_map;
|
||||||
if (!hb_all (input, mapping)) return_trace (false);
|
if (!hb_all (input, mapping)) return_trace (false);
|
||||||
|
|
|
@ -33,6 +33,7 @@ EXTRA_DIST += \
|
||||||
expected/layout.gdef \
|
expected/layout.gdef \
|
||||||
expected/layout.gdef.glyphset \
|
expected/layout.gdef.glyphset \
|
||||||
expected/layout.context \
|
expected/layout.context \
|
||||||
|
expected/layout.context_format2 \
|
||||||
expected/layout.gdef-varstore \
|
expected/layout.gdef-varstore \
|
||||||
expected/layout.gdef-attachlist \
|
expected/layout.gdef-attachlist \
|
||||||
expected/layout.notonastaliqurdu \
|
expected/layout.notonastaliqurdu \
|
||||||
|
|
|
@ -13,6 +13,7 @@ TESTS = \
|
||||||
tests/glyf_bug_3131.tests \
|
tests/glyf_bug_3131.tests \
|
||||||
tests/japanese.tests \
|
tests/japanese.tests \
|
||||||
tests/layout.context.tests \
|
tests/layout.context.tests \
|
||||||
|
tests/layout.context_format2.tests \
|
||||||
tests/layout.gdef-attachlist.tests \
|
tests/layout.gdef-attachlist.tests \
|
||||||
tests/layout.gdef-varstore.tests \
|
tests/layout.gdef-varstore.tests \
|
||||||
tests/layout.gdef.tests \
|
tests/layout.gdef.tests \
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,9 @@
|
||||||
|
FONTS:
|
||||||
|
NotoSansNewa-Regular.ttf
|
||||||
|
|
||||||
|
PROFILES:
|
||||||
|
layout-test.txt
|
||||||
|
layout-test-retain-gids.txt
|
||||||
|
|
||||||
|
SUBSETS:
|
||||||
|
*
|
|
@ -25,6 +25,7 @@ tests = [
|
||||||
'layout.gdef.glyphset',
|
'layout.gdef.glyphset',
|
||||||
'layout.khmer',
|
'layout.khmer',
|
||||||
'layout.context',
|
'layout.context',
|
||||||
|
'layout.context_format2',
|
||||||
'layout.gdef-varstore',
|
'layout.gdef-varstore',
|
||||||
'layout.gdef-attachlist',
|
'layout.gdef-attachlist',
|
||||||
'layout.notonastaliqurdu',
|
'layout.notonastaliqurdu',
|
||||||
|
|
Loading…
Reference in New Issue