Pull the location of the first glyph out of the first list element and
adjust the source position to align them.

Signed-off-by: Keith Packard <kei...@keithp.com>
---
 glamor/glamor_composite_glyphs.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/glamor/glamor_composite_glyphs.c b/glamor/glamor_composite_glyphs.c
index 5950e2c..6915ba8 100644
--- a/glamor/glamor_composite_glyphs.c
+++ b/glamor/glamor_composite_glyphs.c
@@ -350,6 +350,14 @@ glamor_composite_glyphs(CARD8 op,
 
     glyphs_queued = 0;
 
+    /* Adjust source location to align with the
+     * origin of the first glyph
+     */
+    if (nlist) {
+        x_src -= list->xOff;
+        y_src -= list->yOff;
+    }
+
     while (nlist--) {
         x += list->xOff;
         y += list->yOff;
-- 
2.1.4

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to