Frank Chen wrote:

>I found the line-breaking in FOP is based upon spaces between English words.
>But this is not major way for Chinese characters'
>line-breaking. Please see elcosed and big5test.pdf
>to see what happens.
>Is there any implementation-specific way in FOP to modify this?
>Or can you add support to Chinese rendering?

You need to set the language property to chinese (i.e. language="zh"),
you can add it as an attribute to <fo:root> or to each fo you want to
format. Currently FOP checks if the language is ja, zh, ko or vi. If so
it will break in the middle of "words" (western concept of words).

Notice that this is not a complete solution to CJK line-breaking but
it's better not breaking at all, like in your sample. A more
sophisticated algorithm will try to keep together open punctuation marks
with the next character or closing marks with the previous character, so
you won't get a period or comma at the beginning of a line. This is
usually done with "kinsoku" tables (I think that's the japanese term),
that basically lists punctuation marks, whether they're open or close
type and some priority or penalty. I think that's the way TeX does it.


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

Reply via email to