aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Bowditch <cbowditch@apache.org>2004-04-07 14:24:17 +0000
committerChris Bowditch <cbowditch@apache.org>2004-04-07 14:24:17 +0000
commitb717ed06a2b79d847fb12a875d8b3d31023fd5a9 (patch)
tree028d97aa28fa0121da85a0d34f2e624893cd49d0
parenta384db0b1c91bf7f75c5ce8cf8ca621b18206e1e (diff)
downloadxmlgraphics-fop-b717ed06a2b79d847fb12a875d8b3d31023fd5a9.tar.gz
xmlgraphics-fop-b717ed06a2b79d847fb12a875d8b3d31023fd5a9.zip
applied Luca Furini's patch to fix justification bug 28208
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197493 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRenderer.java22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderer.java b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
index 144633ecc..6e2208e5b 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRenderer.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-/* $Id$ */
+/* $Id: PDFRenderer.java,v 1.37 2004/04/02 09:16:49 jeremias Exp $ */
package org.apache.fop.render.pdf;
@@ -953,28 +953,16 @@ public class PDFRenderer extends PrintRenderer {
if (!textOpen || bl != prevWordY) {
closeText();
- pdf.append("1 0 0 -1 " + (rx / 1000f) + " "
- + (bl / 1000f) + " Tm [" + startText);
+ pdf.append("1 0 0 -1 " + (rx / 1000f) + " " + (bl / 1000f) + " Tm "
+ + (text.getTSadjust()/1000f) + " Tw [" + startText);
prevWordY = bl;
textOpen = true;
} else {
- // express the space between words in thousandths of an em
- int space = prevWordX - rx + prevWordWidth;
- float emDiff = (float) space / (float) currentFontSize * 1000f;
- // this prevents a problem in Acrobat Reader and other viewers
- // where large numbers cause text to disappear or default to
- // a limit
- if (emDiff < -33000) {
closeText();
- pdf.append("1 0 0 1 " + (rx / 1000f) + " "
- + (bl / 1000f) + " Tm [" + startText);
+ pdf.append("1 0 0 -1 " + (rx / 1000f) + " " + (bl / 1000f) + " Tm "
+ + (text.getTSadjust()/1000f) + " Tw [" + startText);
textOpen = true;
- } else {
- pdf.append(Float.toString(emDiff));
- pdf.append(" ");
- pdf.append(startText);
- }
}
prevWordWidth = text.getWidth();
prevWordX = rx;