rendernode: Fix handling of color glyphs

The rendernode parser was mixing up its flags.

Test included.

Related: #6075
This commit is contained in:
Matthias Clasen 2023-09-13 13:33:07 -04:00
parent 408dd4b34d
commit 1502c21e97
4 changed files with 13 additions and 1 deletions

View File

@ -3286,7 +3286,7 @@ gsk_text_node_serialize_glyphs (GskRenderNode *node,
string_append_double (p, (double) glyphs[i].geometry.y_offset / PANGO_SCALE);
if (!glyphs[i].attr.is_cluster_start)
g_string_append (p, " same-cluster");
if (!glyphs[i].attr.is_color)
if (glyphs[i].attr.is_color)
g_string_append (p, " color");
}

View File

@ -328,6 +328,8 @@ node_parser_tests = [
'stroke.node',
'stroke.ref.node',
'testswitch.node',
'text-color.node',
'text-color.ref.node',
'text-fail.node',
'text-fail.ref.node',
'text-fail.errors',

View File

@ -0,0 +1,5 @@
text {
color: rgba(255,0,0,0.533333);
font: "Noto Sans 300";
glyphs: 50 312, 2712 0 -156 -28.7891 color;
}

View File

@ -0,0 +1,5 @@
text {
color: rgba(255,0,0,0.533333);
font: "Noto Sans 300";
glyphs: 50 312, 2712 0 -156 -28.7891 color;
}