[gtk/fix-node-glyphs] gsk: Fix serialization of glyphs
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-node-glyphs] gsk: Fix serialization of glyphs
- Date: Mon, 21 Dec 2020 15:50:25 +0000 (UTC)
commit aa95ae774fdc762c11025bbde37d6db24ff5d65a
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 21 10:46:59 2020 -0500
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
gsk/gskrendernodeparser.c | 2 +-
testsuite/gsk/nodeparser/text.node | 6 ++++++
testsuite/gsk/nodeparser/text.ref.node | 6 ++++++
3 files changed, 13 insertions(+), 1 deletion(-)
---
diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c
index 756147adb2..a77e8a5a9a 100644
--- a/gsk/gskrendernodeparser.c
+++ b/gsk/gskrendernodeparser.c
@@ -2692,7 +2692,7 @@ render_node_print (Printer *p,
glyphs[i].geometry.x_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.y_offset / PANGO_SCALE);
if (!glyphs[i].attr.is_cluster_start)
diff --git a/testsuite/gsk/nodeparser/text.node b/testsuite/gsk/nodeparser/text.node
new file mode 100644
index 0000000000..58cd1021f7
--- /dev/null
+++ b/testsuite/gsk/nodeparser/text.node
@@ -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;
+}
diff --git a/testsuite/gsk/nodeparser/text.ref.node b/testsuite/gsk/nodeparser/text.ref.node
new file mode 100644
index 0000000000..58cd1021f7
--- /dev/null
+++ b/testsuite/gsk/nodeparser/text.ref.node
@@ -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;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]