[subset] Don't add invalid gids (-1) to the glyphset when loading glyph map from the accelerator.
This commit is contained in:
parent
09a2662361
commit
a84cae424d
|
@ -55,7 +55,7 @@ struct PairPosFormat1_3
|
||||||
|
|
||||||
if (pairSet.len > glyphs->get_population () * hb_bit_storage ((unsigned) pairSet.len) / 4)
|
if (pairSet.len > glyphs->get_population () * hb_bit_storage ((unsigned) pairSet.len) / 4)
|
||||||
{
|
{
|
||||||
for (hb_codepoint_t g = HB_SET_VALUE_INVALID; glyphs->next (&g);)
|
for (hb_codepoint_t g : glyphs->iter())
|
||||||
{
|
{
|
||||||
unsigned i = cov.get_coverage (g);
|
unsigned i = cov.get_coverage (g);
|
||||||
if ((this+pairSet[i]).intersects (glyphs, valueFormat))
|
if ((this+pairSet[i]).intersects (glyphs, valueFormat))
|
||||||
|
|
|
@ -556,9 +556,12 @@ _populate_unicodes_to_retain (const hb_set_t *unicodes,
|
||||||
if (plan->codepoint_to_glyph->has (cp))
|
if (plan->codepoint_to_glyph->has (cp))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
hb_codepoint_t gid = (*unicode_glyphid_map)[cp];
|
hb_codepoint_t *gid;
|
||||||
plan->codepoint_to_glyph->set (cp, gid);
|
if (!unicode_glyphid_map->has(cp, &gid))
|
||||||
plan->unicode_to_new_gid_list.push (hb_pair (cp, gid));
|
continue;
|
||||||
|
|
||||||
|
plan->codepoint_to_glyph->set (cp, *gid);
|
||||||
|
plan->unicode_to_new_gid_list.push (hb_pair (cp, *gid));
|
||||||
}
|
}
|
||||||
plan->unicode_to_new_gid_list.qsort ();
|
plan->unicode_to_new_gid_list.qsort ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ EXTRA_DIST += \
|
||||||
$(DISABLED_TESTS) \
|
$(DISABLED_TESTS) \
|
||||||
expected/32bit_var_store \
|
expected/32bit_var_store \
|
||||||
expected/basics \
|
expected/basics \
|
||||||
|
expected/preprocess \
|
||||||
expected/full-font \
|
expected/full-font \
|
||||||
expected/glyf_bug_3131 \
|
expected/glyf_bug_3131 \
|
||||||
expected/cff-full-font \
|
expected/cff-full-font \
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
TESTS = \
|
TESTS = \
|
||||||
tests/32bit_var_store.tests \
|
tests/32bit_var_store.tests \
|
||||||
tests/basics.tests \
|
tests/basics.tests \
|
||||||
|
tests/preprocess.tests \
|
||||||
tests/cbdt.tests \
|
tests/cbdt.tests \
|
||||||
tests/cff-full-font.tests \
|
tests/cff-full-font.tests \
|
||||||
tests/cff-japanese.tests \
|
tests/cff-japanese.tests \
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
||||||
|
FONTS:
|
||||||
|
Roboto-Regular.ttf
|
||||||
|
|
||||||
|
PROFILES:
|
||||||
|
gids.txt
|
||||||
|
|
||||||
|
SUBSETS:
|
||||||
|
abcベ
|
|
@ -1,5 +1,6 @@
|
||||||
tests = [
|
tests = [
|
||||||
'basics',
|
'basics',
|
||||||
|
'preprocess',
|
||||||
'full-font',
|
'full-font',
|
||||||
'cff-full-font',
|
'cff-full-font',
|
||||||
'japanese',
|
'japanese',
|
||||||
|
|
Loading…
Reference in New Issue