mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-13 05:50:10 +00:00
rendernode: Fix glyph serialization
We serializing to a string of ASCII, we need to escape some chars, such as '\' and '"'. Fixes: #3710
This commit is contained in:
parent
69f051798e
commit
96ac85038b
@ -2338,7 +2338,18 @@ gsk_text_node_serialize_glyphs (GskRenderNode *node,
|
||||
glyphs[i].geometry.y_offset == 0 &&
|
||||
glyphs[i].attr.is_cluster_start)
|
||||
{
|
||||
g_string_append_c (str, j + MIN_ASCII_GLYPH);
|
||||
switch (j + MIN_ASCII_GLYPH)
|
||||
{
|
||||
case '\\':
|
||||
g_string_append (str, "\\\\");
|
||||
break;
|
||||
case '"':
|
||||
g_string_append (str, "\\\"");
|
||||
break;
|
||||
default:
|
||||
g_string_append_c (str, j + MIN_ASCII_GLYPH);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (glyphs[i].glyph == ascii->glyphs[j].glyph)
|
||||
|
Loading…
Reference in New Issue
Block a user