summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte.benjamin@googlemail.com>2021-07-14 18:46:36 +0000
committerBenjamin Otte <otte.benjamin@googlemail.com>2021-07-14 18:46:36 +0000
commit67952a91420bc6230eac7f68700b38595322813f (patch)
tree463b5e984fef2c5759dee4cf510fca786bb38f81
parentc09718b731171b498b0b6d50833cf19f112a6817 (diff)
parentca3d942b9bdd98c41fc793c65882f569a80eae86 (diff)
downloadgtk+-67952a91420bc6230eac7f68700b38595322813f.tar.gz
Merge branch 'wip/otte/for-master' into 'master'
rendernodeparser: Don't use %g when writing file See merge request GNOME/gtk!3752
-rw-r--r--gsk/gskrendernodeparser.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c
index a8b13c39fe..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;
@@ -2375,16 +2363,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");
}