summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-01-28 18:19:42 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-01-28 18:19:42 -0500
commit20fb155e8c360b0c84f3115e6fd7b32fbea130e9 (patch)
tree37a7e0024888ef7c3aff20a0322ada43c246375e
parentda59c77ae271f564762abf18daa551dfdc31fee1 (diff)
downloadgtk+-20fb155e8c360b0c84f3115e6fd7b32fbea130e9.tar.gz
gsk: Fix render node serializationpango-glyph-positions
When looking for ascii glyphs, we must match the pango shape flags that GTK is using.
-rw-r--r--gsk/gskrendernodeparser.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c
index 90183482f2..c53597732d 100644
--- a/gsk/gskrendernodeparser.c
+++ b/gsk/gskrendernodeparser.c
@@ -689,14 +689,16 @@ create_ascii_glyphs (PangoFont *font)
for (i = MIN_ASCII_GLYPH; i < MAX_ASCII_GLYPH; i++)
{
const char text[2] = { i, 0 };
+ PangoShapeFlags flags = 0;
- pango_shape_with_flags (text,
- 1,
- text,
- 1,
+ if (cairo_version () < CAIRO_VERSION_ENCODE (1, 17, 4))
+ flags = PANGO_SHAPE_ROUND_POSITIONS;
+
+ pango_shape_with_flags (text, 1,
+ text, 1,
&not_a_hack,
glyph_string,
- PANGO_SHAPE_ROUND_POSITIONS);
+ flags);
if (glyph_string->num_glyphs != 1)
{