mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
gsk: Fix a thinko
With subpixel positioning, we need to offset the cached glyphs by their phase.
This commit is contained in:
parent
f5379d2047
commit
0d0bdaa02e
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user