summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-01-28 18:16:16 -0500
committerMatthias Clasen <mclasen@redhat.com>2021-01-28 18:16:16 -0500
commit0d0bdaa02e6e38e2b1997e50a4f3411fcf70176b (patch)
tree870c63ccd860968de5bd07761db426a3ca292e28
parentf5379d204702123afc742d873e1f5fc5726f6f52 (diff)
downloadgtk+-0d0bdaa02e6e38e2b1997e50a4f3411fcf70176b.tar.gz
gsk: Fix a thinko
With subpixel positioning, we need to offset the cached glyphs by their phase.
-rw-r--r--gsk/gl/gskglglyphcache.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gsk/gl/gskglglyphcache.c b/gsk/gl/gskglglyphcache.c
index b147dcef21..9cff7d7ca1 100644
--- a/gsk/gl/gskglglyphcache.c
+++ b/gsk/gl/gskglglyphcache.c
@@ -149,10 +149,10 @@ render_glyph (GlyphCacheKey *key,
glyph_info.glyph = key->data.glyph;
glyph_info.geometry.width = value->draw_width * 1024;
if (glyph_info.glyph & PANGO_GLYPH_UNKNOWN_FLAG)
- glyph_info.geometry.x_offset = 0;
+ glyph_info.geometry.x_offset = 250 * key->data.xshift;
else
- glyph_info.geometry.x_offset = - value->draw_x * 1024;
- glyph_info.geometry.y_offset = - value->draw_y * 1024;
+ glyph_info.geometry.x_offset = 250 * key->data.xshift - value->draw_x * 1024;
+ glyph_info.geometry.y_offset = 250 * key->data.yshift - value->draw_y * 1024;
glyph_string.num_glyphs = 1;
glyph_string.glyphs = &glyph_info;