Simon,

many thanks about your update.

Best positive regards,
Klearchos


-----Original Message-----
From: Simon Pepping [mailto:spepp...@leverkruid.eu] 
Sent: Friday, December 03, 2010 3:46 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Bug 49837 - Soft Hyphen

Hi Klearchos,

The following patch solves the problem:

Index: src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
===================================================================
--- src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
(revision 1041771)
+++ src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
(working copy)
@@ -813,6 +813,10 @@
             }
         }
         int letterSpaces = wordLength - 1;
+        // a word consisting of only a soft hyphen, has wordLenght == 0
+        if (wordLength == 0) {
+            letterSpaces = 0;
+        }
         // if there is a break opportunity and the next one
         // is not a space, it could be used as a line end;
         // add one more letter space, in case other text follows

I will commit it after I have constructed the test case.

Your patch would indeed produce the correct result, as it has
essentially the same effect as my above patch.

On Fri, Dec 03, 2010 at 02:10:02PM +0200, Klearchos Klearchou wrote:
> Hello Simon and All,
> 
> I noticed that there was a series of characters in one of my texts that
was
> included inside the FO (space - space).
> I have removed the - and retyped it. Possibly it has been copied from a
word
> document and it was somehow different.

So it is a machine-generated thing.

Simon

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to