From 5470a1344d70cd5efef8512826fc3cd9ac6b6a61 Mon Sep 17 00:00:00 2001 From: Benjamin Otte <otte@redhat.com> Date: Wed, 14 Jul 2021 20:18:44 +0200 Subject: [PATCH 1/2] rendernodeparser: Don't use %g when writing file %g is locale dependent and can add "," where "." should be. Use string_append_double() instead. --- gsk/gskrendernodeparser.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c index a8b13c39fe..af25763fec 100644 --- a/gsk/gskrendernodeparser.c +++ b/gsk/gskrendernodeparser.c @@ -2375,16 +2375,16 @@ gsk_text_node_serialize_glyphs (GskRenderNode *node, g_string_set_size (str, 0); } - g_string_append_printf (p, "%u %g", - glyphs[i].glyph, - (double) glyphs[i].geometry.width / PANGO_SCALE); + g_string_append_printf (p, "%u ", glyphs[i].glyph); + string_append_double (p, (double) glyphs[i].geometry.width / PANGO_SCALE); if (!glyphs[i].attr.is_cluster_start || glyphs[i].geometry.x_offset != 0 || glyphs[i].geometry.y_offset != 0) { - g_string_append_printf (p, " %g %g", - (double) glyphs[i].geometry.x_offset / PANGO_SCALE, - (double) glyphs[i].geometry.y_offset / PANGO_SCALE); + g_string_append (p, " "); + string_append_double (p, (double) glyphs[i].geometry.x_offset / PANGO_SCALE); + g_string_append (p, " "); + 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"); } From ca3d942b9bdd98c41fc793c65882f569a80eae86 Mon Sep 17 00:00:00 2001 From: Benjamin Otte <otte@redhat.com> Date: Wed, 14 Jul 2021 20:19:40 +0200 Subject: [PATCH 2/2] rendernodeparser: Remove leftover debug prints --- gsk/gskrendernodeparser.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c index af25763fec..9aa091001f 100644 --- a/gsk/gskrendernodeparser.c +++ b/gsk/gskrendernodeparser.c @@ -2352,18 +2352,6 @@ gsk_text_node_serialize_glyphs (GskRenderNode *node, } break; } - else if (glyphs[i].glyph == ascii->glyphs[j].glyph) - { - if (glyphs[i].geometry.width != ascii->glyphs[j].geometry.width) - g_print ("not ascii because of width (%d != %d)\n", - glyphs[i].geometry.width, - ascii->glyphs[j].geometry.width); - if (glyphs[i].geometry.x_offset != 0 || - glyphs[i].geometry.y_offset != 0) - g_print ("not ascii because of offset\n"); - if (!glyphs[i].attr.is_cluster_start) - g_print ("not ascii because of cluster\n"); - } } if (j != ascii->num_glyphs) continue;