Apache OpenOffice (AOO) Bugzilla – Issue 41860
uneven / inaccurate paragraph justification for Thai / CTL
Last modified: 2013-08-07 14:41:36 UTC
The right margin of Thai text doesn't line up correctly when full-justified. This only happen to Thai text, probably due to OOo Thai justification feature that inserts little bits of space between Thai characters to do full-justification. This is tested on Windows and Linux. Test case - In Writer, load the attached file. The first Thai paragraph contains many copies of a single word 'à¸à¸' with random spaces in between. The spaces are to compensate for the bug in issue 41671 by making the lines breakable in many places. - You will see that the right margin of the Thai paragraph doesn't look straight. There are a little bit of error at the end of each line. Compare it with the English paragraph below it. - You can experiment with the Thai paragraph by deleting or adding spaces between words. You will see that the amounts of errors change somewhat randomly. - Adding Thai non-spacing characters like upper/lower vowels and tone marks doesn't effect the errors. See the second paragraph which is the copy of the first paragraph with some Thai non-spacing characters added randomly.
Created attachment 22112 [details] Test document that shows error in Thai justification
FME: This happens due to rounding errors if you use a small font (and therefore have many characters in one line). What happens here is this: If one line has a remaining space of e.g., 300 twips and you have 102 character clusters in your line, the first 101 character cluster should get an additional spacing of 300/101=2.97 twips. Unfortunately 300/101 rounds to 2, therefore you have 300-(2*101) = 98 twips of unused space at the end of the line. We have to find a more stable algorithm for the justification.
This really is an important issue for Thai users. It means that Thai users often get an unacceptable result when they print documents using justified aligment. There is no way that they can work around this, other than by not using justified alignment.
Created attachment 24080 [details] screenshot from OOo 1.9.84
raise Priority to P2, as this can be considered as "lack of (justification) functionality" for writing scripts that affected. from fme's comment, this could happen with any writing script that has to deal with "cluster". For instances, any CTL script -- not just Thai.
no workaround available. fme, does it possible to change the Target milestone to OOo 2.0, please ? thank you.
changed Target Milestone to OOo 2.0, please alter this if find inappropriate (e.g. OOo 2.0.1, ...). thank you.
We have to find a solution but it's too risky to change the algorithmn just now. So I set the target to OOo2.0.1.
We will investigate to find a solution for OOo2.0
FME: Takes some time.
Fixed in cws thaiblocksatz.
Ready for QA. re-open issue and reassign to sba@openoffice.org
reassign to sba@openoffice.org
reset resolution to FIXED
SBA: Verified in local build (CWS thaiblocksatz). To be integrated soon into masterbuild... Set to verified.
SBA: OK in 680m103 / OOo 1.9.103. Closed.