On Dec 22, 2005, at 14:25, Florent Georges wrote:

I have a strange behaviour with 'linefeed-treatment' set
to 'preserve' and 'text-align' set to 'center' with
FOP-0.90.  Given the following FO:
<snip />

I get the following (centered):

         Leasing a ...
      Contract Nr.: W-...

Is the newline expected?

Yes. Writing (in a block with linefeed-treatment="preserve"):
<fo:inline>...</fo:inline>
<fo:inline>...</fo:inline>

is the same as
<fo:inline>...</fo:inline>&#x0A;<fo:inline>...</fo:inline>

The following could be considered a bit different (depending on whether the inline has borders)
<fo:inline>...&#x0A;</fo:inline><fo:inline>...</fo:inline>

If I change the block like this
(add newlines in the second inline):
<snip />
I still get the same output.

That seems like a bug indeed. (To be completely honest, given the discussions we've had so far on fop-dev concerning the topics of white-space/linefeed handling, it doesn't come as much of a surprise to me...) There's two stages of handling white-space / linefeeds: refinement & area tree/line-building. The second stage isn't completely optimized WRT this, I'm afraid. Especially where fo:inlines are involved.

<snip />
Is all this the expected behaviour?

Definitely not all of them, no, but see above: there is still room for improvement.


Cheers,

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to