[gtk/matthiasc/for-master: 12/14] gl: Fix a rounding error in subpixel positioning
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master: 12/14] gl: Fix a rounding error in subpixel positioning
- Date: Sun, 21 Mar 2021 20:05:35 +0000 (UTC)
commit bd0df0324830838c690c0e82b5014364ec4c7b79
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Mar 19 23:17:58 2021 -0400
gl: Fix a rounding error in subpixel positioning
1024 / 4 is 256, not 250.
gsk/gl/gskglglyphcache.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gsk/gl/gskglglyphcache.c b/gsk/gl/gskglglyphcache.c
index 9cff7d7ca1..864c741709 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 = 250 * key->data.xshift;
+ glyph_info.geometry.x_offset = 256 * key->data.xshift;
else
- 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_info.geometry.x_offset = 256 * key->data.xshift - value->draw_x * 1024;
+ glyph_info.geometry.y_offset = 256 * key->data.yshift - value->draw_y * 1024;
glyph_string.num_glyphs = 1;
glyph_string.glyphs = &glyph_info;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]