xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Hennebert <vhenneb...@gmail.com>
Subject Re: A question about justify...
Date Mon, 13 Jul 2009 10:16:31 GMT
Hi Henrik,

Henrik Lindberg wrote:
> Hi,
> I wonder if there is some parameter than can be set when using justified
> text that will limit the amount of white space between words?

To my knowledge there is no such option in XSL-FO. It’s left to the
XSL-FO processor to decide what to do in such cases.

FOP does the following: it first tries to lay out the paragraph without
hyphenating any word. If it can’t find any satisfiable layout (and
hyphenation is enabled), then it tries again with hyphenation. If that
still doesn’t work, it relieves the limit on white space stretching.
This time it’s almost always sure that a layout will be found, at the
price of some very stretched spaces. The rationale is that in batch
processing environments you don’t want an error to be thrown because no
nice way of laying out a paragraph can be found. If you want
high-quality output then you’re likely to be ready to proof-read the
document, hunting for such paragraphs, and slightly re-formulate them so
that they fit nicely on the page.

> I am thinking of something that when a line requires too much space
> between words to make it justified it should be rendered as "last line".

Unless text-align-last is set to “justify” this is likely to disturb the
reading IMO. Readers will believe that the paragraph ends there. I’m not
sure you want to do that.

One could imagine an option to trigger a warning when a paragraph can’t
be laid out properly, instead of silently falling back to a degraded
mode (that would greatly help the proof-reading mentioned above). Feel
free to submit a feature request on Bugzilla:


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

View raw message