(moved from fop-users as we are going into the implementation details)

Manuel Mall wrote:

the shorthand property white-space="pre" should be used or its expanded equivalents:
   linefeed-treatment="preserve"
   white-space-collapse="false"
   white-space-treatment="preserve"
   wrap-option="no-wrap"

If you do that the bug I was referring to would show because
white-space-treatment="preserve" is not correctly implemented.

In order to preserve all spaces, we could use the elements that are now generated for a nbsp:
   box  w=0
   penalty inf
   glue (elastic or not, according to the alignment)

They are not suppressed and they do not allow a break, so I think they should fit quite well this situation too, when white-space-treatment = "preserve" and wrap-option="no-wrap".

If wrap-option="wrap", however, we must add some penalties in order to allow a break between spaces; we must be careful, as if there are 3 spaces between two words, there are 4 possible breaks (ignoring, at the moment, unicode breaking rules), so we just cannot add a penalty before or after the other elements.

Is this ok, or am I missing some important detail?

Regards
    Luca

Reply via email to