[subset] fix bug in CPAL V1tail serialization
We should serialize nameIDs rather than retained color index
This commit is contained in:
parent
6d2705a719
commit
7b77cd198c
|
@ -95,13 +95,10 @@ struct CPALV1Tail
|
||||||
if (colorLabelsZ)
|
if (colorLabelsZ)
|
||||||
{
|
{
|
||||||
c->push ();
|
c->push ();
|
||||||
for (const auto _ : colorLabels)
|
for (unsigned i = 0; i < color_count; i++)
|
||||||
{
|
{
|
||||||
const hb_codepoint_t *v;
|
if (!color_index_map->has (i)) continue;
|
||||||
if (!color_index_map->has (_, &v)) continue;
|
if (!c->copy<NameID> (colorLabels[i]))
|
||||||
NameID new_color_idx;
|
|
||||||
new_color_idx = *v;
|
|
||||||
if (!c->copy<NameID> (new_color_idx))
|
|
||||||
{
|
{
|
||||||
c->pop_discard ();
|
c->pop_discard ();
|
||||||
return_trace (false);
|
return_trace (false);
|
||||||
|
|
Loading…
Reference in New Issue