From 650d044dfdbb5ea5849d65b70f5761b8f47f75d6 Mon Sep 17 00:00:00 2001 From: Adrian Johnson Date: Thu, 20 Nov 2014 10:16:06 +1030 Subject: [PATCH] pdf-operators: fix bug with RTL text bug 86461 --- src/cairo-pdf-operators.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cairo-pdf-operators.c b/src/cairo-pdf-operators.c index ee41eba7b..dcee25f0c 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++) {