Apache OpenOffice (AOO) Bugzilla – Issue 53373
Align "Justified" in Draw text box does not work very well for CJK text
Last modified: 2013-08-07 14:44:35 UTC
How to reproduce 1. open attached file (ja_justify.odt) 2. double click text 3. click "Align Left" or "Justified" "Justfied" does not align right side of Japanese text well. This is reported as Impress bug from user, but general for all of TextBox.
Created attachment 28803 [details] Japanese text sample for TextBox justification
Reassigned to SBA.
Please explain what you mean with "not well". To me it looks fine. Please provide a screenshot with more explanation. Please mention the real version of OOo you used.
SBA: (1) It depends on the font.... The font that Naoyuki used is a proportional font. ("HG-P MinchoL Sun", only that "Mincho" is in Japanese Kanji)) - If a system has to replace this one with a non-proportional CJK font (i.e. Arial Unicode MS), the problem is not visibe. (2) The document has a Draw Text Frame that shows the problem. within these, other algorithms do text formatting than in Writer Text frames or in a Writer Text document. I will attach a Writer document with all three and for those who'd like to see the problem, the correspondent PFD export, too. In total, this is not exactly a Writer problem (although FME will have to deal with it :-) and from the "Writer point of view", this is a Prio4 proplem. Reassigned to FME.
SBA: I removed the keyword "needmoreinfo" because I could reproduce it and tracked it down with FME.
Created attachment 28882 [details] Same text string in Writer text, Writer Text frame and Draw text box
Created attachment 28883 [details] PDF export of it...
SBA: Adjusted Summary (Problem exists in Draw Text box only)
*** Issue 69008 has been marked as a duplicate of this issue. ***
Any suggestion to the issue 58813 ? A body text of Writer is capable of handling with align justified for Asian characters as well as Western letters. A text box on the Drawing tool bar currently seems not to able to take care of Asian characters in a desired way. Justification in a text box using a space u0020 is working well, but justification for Asian characters seems not to work at all. For Asian characters, align justified could be implemented by adding a small padding between each Asian character to make the whole length of the text fit to the margin. While for Western letters, align justified is implemented by adjusting the width of space letter to make the whole length of the text fit to the margin. In the issue 58813, forbidden character is mentioned, but it is not necessary. Using a proportional font such as "MS PMincho," this phenomenon easily can be reproduced.
Hi. One suggestions: Please add the word "CJK", "Chinese", "Korean", "Unicode", "font" to this issue's description or subject, because they seems to be the keyword the bug reporters use to search before they submit a duplicated bug. Just curious, is there a cross-platform layout engine that can be plugged in to any word processing / layout application to do the things like text justification, calculating space between ideograph? As far as I know this is a problem that a lot other software meets (OOO, LaTex, Scribus, Abiword, Kword, Ted, a2ps, firefox, thunderbird, etc etc) and does it make sense to use a cross-platform library for this? e.g. some text layout issue are very hard to solve (proper vertical top-to-bottom right-to-left layout I used to use in Outlook Express emails when I write email with history scholars). MS seems to be able to solve this problem on a wider scale, e.g. I can make webpages in top-bottom right-left layout with IE and use this layout for writing emails, this is an impossible in all OSS email/browser software I used. Did MS use some cross-product library for their own use?
fme->tl: EditEngine issue.
*** Issue 58813 has been marked as a duplicate of this issue. ***
It would be nice to either use an external layout engine to do the justification or make one from OOo's code. But right now, OOo does its own text layout processing. To make matters worse, Writer's text layout code and Calc/Draw/Impress's text layout are totally separate code, so there is a fair amount of duplication going on there. Anyway, I found the root cause of this while investigating for Issue 107470. I can take care of this.
started.
Created attachment 67162 [details] proof of fix
>is there a cross-platform layout engine that can be plugged in to any word processing / layout application to do the things like text justification, calculating space between ideograph? The ICU library provides a generic text layout engine that is cross-platform: http://userguide.icu-project.org/layoutengine However, from the description in the User Guide, it seems to work only in a single font, single script case. So, even if we were try to use that library, it would only work with unformatted string rendering only.
"proof of fix" means you already fixed? When we can use fixed version?
This will be fixed in in the koheiasiantextalign cws, which is targeted for 3.4 inclusion. The feature freeze for 3.3 is almost around the corner which is the reason for setting target on 3.4. If you would like to "preview" this fix, go-oo 3.2.1 will include it in case you are open to trying a downstream version of OOo.
Reset assignee on issues not touched by assignee in more than 1000 days.