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

pull/3295/head
Qunxin Liu 3 years ago committed by Behdad Esfahbod
parent a75b96f7e5
commit e88fc41ef3
  1. 5
      src/hb-ot-layout-gsubgpos.hh
  2. 1
      test/subset/data/Makefile.am
  3. 1
      test/subset/data/Makefile.sources
  4. BIN
      test/subset/data/expected/layout.context_format2/NotoSansNewa-Regular.layout-test-retain-gids.retain-all-codepoint.ttf
  5. BIN
      test/subset/data/expected/layout.context_format2/NotoSansNewa-Regular.layout-test.retain-all-codepoint.ttf
  6. BIN
      test/subset/data/fonts/NotoSansNewa-Regular.ttf
  7. 9
      test/subset/data/tests/layout.context_format2.tests
  8. 1
      test/subset/meson.build

@ -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);

@ -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 \

@ -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 \

@ -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.khmer',
'layout.context',
'layout.context_format2',
'layout.gdef-varstore',
'layout.gdef-attachlist',
'layout.notonastaliqurdu',

Loading…
Cancel
Save