[subset] inputSequence could be empty, change the sanity check

This commit is contained in:
Qunxin Liu authored and Behdad Esfahbod committed 2021-11-19 12:57:43 -07:00
1 parent a75b96f7e5
commit e88fc41ef3
8 files changed
+14 -3

No files matched your search

+2 -3
View File
@@ -1642,9 +1642,8 @@ struct Rule
const hb_map_t *klass_map = nullptr) const
{
TRACE_SUBSET (this);
const hb_array_t<const HBUINT16> input = inputZ.as_array ((inputCount ? inputCount - 1 : 0));
if (!input.length) return_trace (false);
if (unlikely (!inputCount)) return_trace (false);
const hb_array_t<const HBUINT16> input = inputZ.as_array (inputCount - 1);
const hb_map_t *mapping = klass_map == nullptr ? c->plan->glyph_map : klass_map;
if (!hb_all (input, mapping)) return_trace (false);
+1
View File
@@ -33,6 +33,7 @@ EXTRA_DIST += \
expected/layout.gdef \
expected/layout.gdef.glyphset \
expected/layout.context \
expected/layout.context_format2 \
expected/layout.gdef-varstore \
expected/layout.gdef-attachlist \
expected/layout.notonastaliqurdu \
+1
View File
@@ -13,6 +13,7 @@ TESTS = \
tests/glyf_bug_3131.tests \
tests/japanese.tests \
tests/layout.context.tests \
tests/layout.context_format2.tests \
tests/layout.gdef-attachlist.tests \
tests/layout.gdef-varstore.tests \
tests/layout.gdef.tests \
Binary file not shown.
@@ -0,0 +1,9 @@
FONTS:
NotoSansNewa-Regular.ttf
PROFILES:
layout-test.txt
layout-test-retain-gids.txt
SUBSETS:
*
+1
View File
@@ -25,6 +25,7 @@ tests = [
'layout.gdef.glyphset',
'layout.khmer',
'layout.context',
'layout.context_format2',
'layout.gdef-varstore',
'layout.gdef-attachlist',
'layout.notonastaliqurdu',