summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-02-08 15:19:14 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-02-08 15:20:41 +0000
commit2d7ac9e737f37daf8490c27e6a04c65bba642645 (patch)
treedf85d9d3ade7644c47e858aa15a9b10bb1019220
parentea16302e45ced56e6f12b8520e9f530e1ffc68c4 (diff)
xlib: Only apply the dst offset to the glyph strings once
The elts offset is a delta from the previous glyph coordinate. So by subtracting the dst origin everytime, we were accumulating a glyph position error. Instead we just want to offset the starting coordinate and then always use relative positions. Reported-by: Theo Veenker <T.J.G.Veenker@uu.nl> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/cairo-xlib-render-compositor.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cairo-xlib-render-compositor.c b/src/cairo-xlib-render-compositor.c
index 12f357de..013e2aff 100644
--- a/src/cairo-xlib-render-compositor.c
+++ b/src/cairo-xlib-render-compositor.c
@@ -1469,14 +1469,14 @@ _emit_glyphs_chunk (cairo_xlib_display_t *display,
*/
if (_start_new_glyph_elt (j, &glyphs[i])) {
if (j) {
- elts[nelt].nchars = n;
- nelt++;
- n = 0;
+ elts[nelt].nchars = n;
+ nelt++;
+ n = 0;
}
elts[nelt].chars = char8 + size * j;
elts[nelt].glyphset = info->glyphset;
- elts[nelt].xOff = glyphs[i].i.x - dst_x;
- elts[nelt].yOff = glyphs[i].i.y - dst_y;
+ elts[nelt].xOff = glyphs[i].i.x;
+ elts[nelt].yOff = glyphs[i].i.y;
}
switch (width) {
@@ -1579,7 +1579,7 @@ composite_glyphs (void *surface,
cairo_xlib_display_t *display = dst->display;
cairo_int_status_t status = CAIRO_INT_STATUS_SUCCESS;
cairo_scaled_glyph_t *glyph;
- cairo_fixed_t x = 0, y = 0;
+ cairo_fixed_t x = dst_x, y = dst_y;
cairo_xlib_font_glyphset_t *glyphset = NULL, *this_glyphset_info;
unsigned long max_index = 0;