[gtk/matthiasc/for-master: 13/14] ngl: 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: 13/14] ngl: Fix a rounding error in subpixel positioning
- Date: Sun, 21 Mar 2021 20:05:35 +0000 (UTC)
commit 7a56aa910ebc72cbd156fb779ef12f68b675db54
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Mar 19 23:18:43 2021 -0400
ngl: Fix a rounding error in subpixel positioning
1024 / 4 is 256, not 250.
gsk/ngl/gsknglglyphlibrary.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gsk/ngl/gsknglglyphlibrary.c b/gsk/ngl/gsknglglyphlibrary.c
index 502bf01e26..2179a804d7 100644
--- a/gsk/ngl/gsknglglyphlibrary.c
+++ b/gsk/ngl/gsknglglyphlibrary.c
@@ -176,10 +176,10 @@ render_glyph (cairo_surface_t *surface,
glyph_info.glyph = key->glyph;
glyph_info.geometry.width = value->ink_rect.width * 1024;
if (glyph_info.glyph & PANGO_GLYPH_UNKNOWN_FLAG)
- glyph_info.geometry.x_offset = 250 * key->xshift;
+ glyph_info.geometry.x_offset = 256 * key->xshift;
else
- glyph_info.geometry.x_offset = 250 * key->xshift - value->ink_rect.x * 1024;
- glyph_info.geometry.y_offset = 250 * key->yshift - value->ink_rect.y * 1024;
+ glyph_info.geometry.x_offset = 256 * key->xshift - value->ink_rect.x * 1024;
+ glyph_info.geometry.y_offset = 256 * key->yshift - value->ink_rect.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]