Apache OpenOffice (AOO) Bugzilla – Issue 108684
Better text justification
Last modified: 2017-05-20 11:33:19 UTC
Writer currently justifies text by three different methods depending on the script type (Latin, CJK, CTL). To do this it only has the logical widths of the string components. This results in a very sub-optimal line layout because it does not use any of the advanced typographical features available from the fonts such as using alternate glyphs or ligatures, optical bounds, etc. and results in very tricky problems when glyph clusters or reordering is involved. So the root cause problem is that the justified layout of the runs (aka. portions in WriterSpeak) is done in the wrong layer. Writer should let the specialized layout engines do this. It itself should focus on distributing the available space to portions. In practice this means that the DrawTextArray argument should not provide the pDXArray, but only the justified width. The cursor positions should be gotten from GetCaretPositions instead of GetTextArray, because the former provides the physical positions the latter allow only a rough calculation of the logical positions. This all would not only result in a better typographic layout (on the reference device) but also in a much better readability on the screen. Currently the lower layers have no way of distinguishing a writer request for e.g. a tab position to e.g. an adjusting-to-reference-device rounding problem (such as issue 88539).
Reset assigne to the default "issues@openoffice.apache.org".