mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-24 20:51:10 +00:00
rendernode: Fix handling of color glyphs
The rendernode parser was mixing up its flags. Test included. Related: #6075
This commit is contained in:
parent
408dd4b34d
commit
1502c21e97
@ -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");
|
||||
}
|
||||
|
||||
|
@ -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',
|
||||
|
5
testsuite/gsk/nodeparser/text-color.node
Normal file
5
testsuite/gsk/nodeparser/text-color.node
Normal 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;
|
||||
}
|
5
testsuite/gsk/nodeparser/text-color.ref.node
Normal file
5
testsuite/gsk/nodeparser/text-color.ref.node
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user