From 330656e9e1cda3ab8a1f3f5a7768f766029bf700 Mon Sep 17 00:00:00 2001 From: Matthias Reischenbacher Date: Fri, 27 Apr 2018 00:33:04 +0000 Subject: FOP-2789: fix text overlapping issue in rl content git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1830287 13f79535-47bb-0310-9956-ffa450edef68 --- .../AbstractPageNumberCitationLayoutManager.java | 4 +- ...age-number-citation_writing-mode_rl_bug2789.xml | 62 ++++++++++++++++++++++ 2 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 fop/test/layoutengine/standard-testcases/page-number-citation_writing-mode_rl_bug2789.xml diff --git a/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java b/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java index ee4143982..2e1b7f2ae 100644 --- a/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java +++ b/fop-core/src/main/java/org/apache/fop/layoutmgr/inline/AbstractPageNumberCitationLayoutManager.java @@ -124,7 +124,9 @@ public abstract class AbstractPageNumberCitationLayoutManager extends LeafNodeLa TextArea text; if (resolved) { text = new TextArea(); - text.addWord(citationString, 0); + int bidiLevel = getBidiLevel(); + text.setBidiLevel(bidiLevel); + text.addWord(citationString, getStringWidth(citationString), null, null, null, 0); } else { UnresolvedPageNumber unresolved = new UnresolvedPageNumber(citation.getRefId(), font, getReferenceType()); diff --git a/fop/test/layoutengine/standard-testcases/page-number-citation_writing-mode_rl_bug2789.xml b/fop/test/layoutengine/standard-testcases/page-number-citation_writing-mode_rl_bug2789.xml new file mode 100644 index 000000000..3dccad944 --- /dev/null +++ b/fop/test/layoutengine/standard-testcases/page-number-citation_writing-mode_rl_bug2789.xml @@ -0,0 +1,62 @@ + + + + + +

+ This test checks fo:page-number-citation in a RTL writing-mode context. +

+
+ + + + + + + + + + AASDFASDFASDFASDF + B + B + A + A + A + A + A + A + A + A + A + A + + البيانات . + + + + + + + + + + + + + +
-- cgit v1.2.3