diff --git a/src/hb-vector-svg-subset.cc b/src/hb-vector-svg-subset.cc index 36db8ca70..54c25e24c 100644 --- a/src/hb-vector-svg-subset.cc +++ b/src/hb-vector-svg-subset.cc @@ -199,10 +199,10 @@ hb_svg_add_unique_id (hb_vector_t *v, const char *p, unsigned n) { - if (!n) return false; + if (!n) return true; OT::SVG::svg_id_span_t key = {p, n}; if (seen_ids->has (key)) - return false; + return true; if (unlikely (!seen_ids->set (key, true))) return false; auto *slot = v->push (); diff --git a/test/vector/data/expected/basic/handwriting-picosvg.svg b/test/vector/data/expected/basic/handwriting-picosvg.svg new file mode 100644 index 000000000..0853e02fd --- /dev/null +++ b/test/vector/data/expected/basic/handwriting-picosvg.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/test/vector/data/tests/basic.tests b/test/vector/data/tests/basic.tests index 32394776a..42712bf00 100644 --- a/test/vector/data/tests/basic.tests +++ b/test/vector/data/tests/basic.tests @@ -15,3 +15,5 @@ ../fonts/2db082c6c462d5056544e56e7ea13bf58c33a832.ttf;--logical;U+0646,U+0633,U+062A,U+0639,U+0644,U+06CC,U+0642;../expected/basic/iran-nastaliq-y-offsets.svg ../../../fuzzing/fonts/noto_handwriting-untouchedsvg.ttf;;U+270D;../expected/basic/handwriting-svg.svg ../../../fuzzing/fonts/noto_handwriting-untouchedsvgz.ttf;;U+270D;../expected/basic/handwriting-svg.svg +../../../fuzzing/fonts/noto_handwriting-picosvg.ttf;;U+270D;../expected/basic/handwriting-picosvg.svg +../../../fuzzing/fonts/noto_handwriting-picosvgz.ttf;;U+270D;../expected/basic/handwriting-picosvg.svg