aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/area/inline/SpaceArea.java
diff options
context:
space:
mode:
authorLuca Furini <lfurini@apache.org>2005-10-25 15:14:10 +0000
committerLuca Furini <lfurini@apache.org>2005-10-25 15:14:10 +0000
commit5cdaf10f11c193c2a2b833d2ea37a914764c665a (patch)
treecc275f275b5f3eb1085cf619deb8ddde9b43a0d7 /src/java/org/apache/fop/area/inline/SpaceArea.java
parent1cb5e8113f4eafa673ab1adbf63510ac1833cb87 (diff)
downloadxmlgraphics-fop-5cdaf10f11c193c2a2b833d2ea37a914764c665a.tar.gz
xmlgraphics-fop-5cdaf10f11c193c2a2b833d2ea37a914764c665a.zip
Fix for bug 36238 (at least in the PDFRenderer)
The text is split into WordAreas and SpaceAreas: the latters (when the font is multibyte) are not affected by the Tw operator, so they are shifted in the inline progression dimension instead. The behaviour of the other renderers should be the same as before this change. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@328381 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area/inline/SpaceArea.java')
-rw-r--r--src/java/org/apache/fop/area/inline/SpaceArea.java62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/area/inline/SpaceArea.java b/src/java/org/apache/fop/area/inline/SpaceArea.java
new file mode 100644
index 000000000..1b5a1ae6e
--- /dev/null
+++ b/src/java/org/apache/fop/area/inline/SpaceArea.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* $Id$ */
+package org.apache.fop.area.inline;
+
+/**
+ * A space
+ */
+public class SpaceArea extends InlineArea {
+
+ /**
+ * The space for this space area
+ */
+ protected String space;
+
+ /**
+ * The correction offset for the next area
+ */
+ protected int offset = 0;
+
+ /**
+ * Create a text inline area
+ * @param s the space character
+ */
+ public SpaceArea(char s) {
+ space = new String() + s;
+ }
+
+ /**
+ * @return Returns the space.
+ */
+ public String getSpace() {
+ return new String(space);
+ }
+
+ /**
+ * @return Returns the offset.
+ */
+ public int getOffset() {
+ return offset;
+ }
+ /**
+ * @param o The offset to set.
+ */
+ public void setOffset(int o) {
+ offset = o;
+ }
+}