aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache
diff options
context:
space:
mode:
authorfotis <fotis@unknown>2001-02-27 12:48:59 +0000
committerfotis <fotis@unknown>2001-02-27 12:48:59 +0000
commitb048fd746595215b7c2f5e85ead6bab0ecf4612d (patch)
tree48a717ed00a329a0d12d52ff5d5399b000be4031 /src/org/apache
parent375b678502231f5577d5b18550c35678d11e11d8 (diff)
downloadxmlgraphics-fop-b048fd746595215b7c2f5e85ead6bab0ecf4612d.tar.gz
xmlgraphics-fop-b048fd746595215b7c2f5e85ead6bab0ecf4612d.zip
fixed: error if char width = 0 in leader
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194096 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache')
-rw-r--r--src/org/apache/fop/layout/LineArea.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/org/apache/fop/layout/LineArea.java b/src/org/apache/fop/layout/LineArea.java
index 5f31fed46..5993c79b3 100644
--- a/src/org/apache/fop/layout/LineArea.java
+++ b/src/org/apache/fop/layout/LineArea.java
@@ -787,8 +787,14 @@ public class LineArea extends Area {
* and wraps it in an InlineArea which is returned
*/
private InlineArea buildSimpleLeader(int charNumber, int leaderLength) {
+ int width = this.currentFontState.width(charNumber);
+ if (width == 0) {
+ char c = (char) charNumber;
+ MessageHandler.errorln("char " + c + " has width 0. Using width 100 instead.");
+ width = 100;
+ }
int factor = (int) Math.floor (leaderLength /
- this.currentFontState.width(charNumber));
+ width);
char [] leaderChars = new char [factor];
char fillChar = (char) charNumber;
for (int i = 0; i < factor; i ++) {