[cairo-commit] src/cairo-pdf-operators.c

Adrian Johnson ajohnson at kemper.freedesktop.org
Wed Nov 19 15:49:24 PST 2014


 src/cairo-pdf-operators.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit ae608035c7b7133826a608d45e067c3875a1aceb
Author: Adrian Johnson <ajohnson at redneon.com>
Date:   Thu Nov 20 10:16:06 2014 +1030

    pdf-operators: fix bug with RTL text
    
    bug 86461

diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c
index ee41eba..dcee25f 100644
--- a/src/cairo-pdf-operators.c
+++ b/src/cairo-pdf-operators.c
@@ -1415,7 +1415,11 @@ _cairo_pdf_operators_emit_cluster (cairo_pdf_operators_t      *pdf_operators,
 	    return status;
     }
 
-    cur_glyph = glyphs;
+    if (cluster_flags & CAIRO_TEXT_CLUSTER_FLAG_BACKWARD)
+	cur_glyph = glyphs + num_glyphs - 1;
+    else
+	cur_glyph = glyphs;
+
     /* XXX
      * If no glyphs, we should put *something* here for the text to be selectable. */
     for (i = 0; i < num_glyphs; i++) {


More information about the cairo-commit mailing list