gsk: Fix serialization of glyphs

We were forgetting to put a space between two numbers
in some cases, confusing the parser.

Test included.

Fixes: #3496
This commit is contained in:
Matthias Clasen 2020-12-21 10:46:59 -05:00
parent 933d241bba
commit aa95ae774f
3 changed files with 13 additions and 1 deletions

View File

@ -2692,7 +2692,7 @@ render_node_print (Printer *p,
glyphs[i].geometry.x_offset != 0 || glyphs[i].geometry.x_offset != 0 ||
glyphs[i].geometry.y_offset != 0) glyphs[i].geometry.y_offset != 0)
{ {
g_string_append_printf (p->str, "%g %g", g_string_append_printf (p->str, " %g %g",
(double) glyphs[i].geometry.x_offset / PANGO_SCALE, (double) glyphs[i].geometry.x_offset / PANGO_SCALE,
(double) glyphs[i].geometry.y_offset / PANGO_SCALE); (double) glyphs[i].geometry.y_offset / PANGO_SCALE);
if (!glyphs[i].attr.is_cluster_start) if (!glyphs[i].attr.is_cluster_start)

View File

@ -0,0 +1,6 @@
text {
color: rgb(50,50,50);
font: "Cantarell 11";
glyphs: "N", 430 5, 406 8, 417 7, 772 4, 783 5, 783 5, 793 6 0 0 same-cluster;
offset: 0 32.0186;
}

View File

@ -0,0 +1,6 @@
text {
color: rgb(50,50,50);
font: "Cantarell 11";
glyphs: "N", 430 5, 406 8, 417 7, 772 4, 783 5, 783 5, 793 6 0 0 same-cluster;
offset: 0 32.0186;
}