Re: Chinese characters line-breaking
- Original Message - From: Frank Chen [EMAIL PROTECTED] To: Alex McLintock [EMAIL PROTECTED] Sent: Thursday, August 30, 2001 5:49 PM Subject: Re: Chinese characters line-breaking Alex: I'll do it. Please wait some time... --Frank - Original Message - From: Alex McLintock [EMAIL PROTECTED] To: Frank Chen [EMAIL PROTECTED] Sent: Wednesday, August 29, 2001 10:44 PM Subject: Re: Chinese characters line-breaking --- Frank Chen [EMAIL PROTECTED] wrote: Hi, Alex: As I remember, the CR says they don't define a line-breaking algorithm, and it is implementation-specific thing. So I think maybe FOP team has their idea around this problem. That's why I ask, and look for suggestion. --Frank Thanks for the clarification Frank. AFAIR there hasn't been any discussion of this before so you might have to tell us what the correct algorithm is. Alex = Alex McLintock[EMAIL PROTECTED]Open Source Consultancy in London OpenWeb Analysts Ltd, http://www.OWAL.co.uk/ SF and Computing Book News and Reviews: http://news.diversebooks.com/ Get Your XML T-Shirt t-shirt/ at http://www.inversity.co.uk/ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Chinese characters line-breaking
Hi: 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 files:big5test.fo 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? --Frank Chen big5test.fo big5test.pdf - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
Re: Chinese characters line-breaking
Frank Chen wrote: Hi: 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 files:big5test.fo 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. Carlos - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]