[prev in list] [next in list] [prev in thread] [next in thread]
List: fop-cvs
Subject: cvs commit: xml-fop/src/org/apache/fop/layout LineArea.java
From: fotis () apache ! org
Date: 2001-02-27 12:48:59
[Download RAW message or body]
fotis 01/02/27 04:48:59
Modified: src/org/apache/fop/layout LineArea.java
Log:
fixed: error if char width = 0 in leader
Revision Changes Path
1.36 +8 -2 xml-fop/src/org/apache/fop/layout/LineArea.java
Index: LineArea.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/LineArea.java,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- LineArea.java 2001/02/27 12:28:16 1.35
+++ LineArea.java 2001/02/27 12:48:59 1.36
@@ -1,4 +1,4 @@
-/*-- $Id: LineArea.java,v 1.35 2001/02/27 12:28:16 fotis Exp $ --
+/*-- $Id: LineArea.java,v 1.36 2001/02/27 12:48:59 fotis Exp $ --
============================================================================
The Apache Software License, Version 1.1
@@ -787,8 +787,14 @@
* 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 ++) {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic