Apache OpenOffice (AOO) Bugzilla – Issue 71195
Irregular highlighting in mixed (Western + CJK/CTL) text
Last modified: 2013-08-07 14:38:26 UTC
Scenario 1.Enter the text of English and CJK. 2.Set the highlighting color. Problem The position of the highlighting color is not fit on the text of English and CJK. The position of the under line is fit.
Created attachment 40328 [details] Screeshot
Created attachment 40329 [details] Sample file
catch: thank you for submitting this issue with an understandable illustration. I was wondering if you could give us an example for vertical writing as well. In additional to vertical writing, what do you think of the following situations? - When a line has a larger size of characters, how OOo should color them. For instance, a line with a base text in 10.5 pt and some characters in 24 pt. - When a distance between lines in a paragraph is specified other than 1 line. For instance, 1.5 line, double space, and variable distance. Microsoft Word 2003 seems to determine a hight of colored area with the maximum value of all glyphs of characters in a line. Current OOo seems to determine it with a hight of each glyph, i.e. character by character.
Created attachment 40338 [details] Sample file(Vertical writting, font size, line spacing)
tora-san: thank you for your comment. I attached new sample file. The position of the highlighting color is not fit any connditions. please refer it.
catch: Thank you for appending a useful example. Opening a converted Word file with Word after loading your example file and saving it as a Word file would help us understand requirements. a) For a mixture of different font sizes in a line, we can see what happens by manually increasing a font size of some letters in a line. 1. Type a text like "A Happy New Year" in a default font size. 2. Choose a word Happy and change its font size to 36pt. 3. See what happens. 4. Do the same steps with both Writer and Word. A behavior of Word is not perfect, but is better than that of current Writer. b) For a different line spacing, we can do it in a similar way: 1. Fill an empty document with a dummy text by typing d t F3. 2. Choose an entire text of the paragraph. 3. Make the chosen text colored. 4. Format > Paragraph > Indent and Line spacing 5. Change its line spacing from 1 line to 1.5 or 2 lines. 6. See what happens. 7. Do the same steps with both Writer and Word. For me, Writer is superior to Word. c) Do the steps of both a) and b) at the same time.
Reassigned to SBA.
SBA: The use of different fonts for Western and CJK (or CTL) leads to the highlighting problem. Altough the font size is the same, slightly different font metrics lead to different positions (in relation to the text base line). I adjusted the summary for clarification. (Poor) Workaround: Use the same font+size for Western and CJK/CTL text. SBA->FME: I remember that you solved the corresponding problem for underlining, by "setting a start and end point", regardless of font sizes in between. It looks as if something similar needs to be done for highlighting. Of course, I do believe that it is as easy as one can imagine (use the same code again, hahaha! :-) Please proceed.
FME: I'll change the owner to "requirements". As you might imagine, this is not a bug but an "request for enhancement", I cannot simply change the existing behavior without taking care for compatibility.