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.

By doing this the problem disappeared.
I was able to find the same pattern in other many places and I thought that
this was not a good solution. So I tried to check the source code.

I do not do anything special. Basically I print out the text mentioned
previously (XSLT):
<xsl:value-of select="$title"/>

I agree that this could have many side-effects but up to now I haven't seen
anything bad at the generated PDFs.

What could go wrong? 
For example missing characters or overlapping text?

Regards,
Klearchos


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

On Fri, Dec 03, 2010 at 12:17:43PM +0200, Klearchos Klearchou wrote:
> Hello Simon,
> 
> Thank you for answering I was about to write a new mail.
> I have changed the code at the class (org.apache.fop.traits.MinOptMax).
> 
> Here is the change:
>     public MinOptMax mult(int factor) {
>         if (factor < 0) {
>                       factor = 0;
>         }
>               
>               if (factor == 1) {
>             return this;
>         } else {
>             return getInstance(min * factor, opt * factor, max * factor);
>         }
>     }
> 
> Basically instead of throwing an Exception I set the value to 0 and I let
it
> return the getInstance(min * factor, opt * factor, max * factor).
> 
> I am currently checking the code and it seems that the PDFs look ok and of
> course there is no exception.
> 
> Could you please tell me if this could have any side-effect since I do not
> have lot of experience with the FOP source.

That is a quick hack, and it might well have any side effects.

Can you tell us your use case: Why do you want to process fo files
with a soft hyphen after a white space or at the start of a block?

I will try to find out how the factor can be -1; it should not.

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