Apache OpenOffice (AOO) Bugzilla – Issue 99781
Chart: text layout at different zoom levels has different problems
Last modified: 2013-09-25 20:41:57 UTC
Font Kerning in Chart does not work properly. For example, see the word "Anderswo" in the attached files.
Created attachment 60596 [details] Example font kerning in Chart
Created attachment 60597 [details] Example font kerning in Chart
I can confirm the problem.
@weiz, please have a look.
Created attachment 61163 [details] example document
The error is caused by Zoom feature and the font itself. Everything is OK when the zoom factor is 100%. if change the zoom factor, no matter zoom in or zoom out, the error occured. The error occured while different fonts under different settings. Please look at the example document to get the detail information.
Created attachment 61351 [details] example document
@iha, the new example document is attached.
Thanks, weiz! The new example document shows that the font kerning problems do occur also within calc depending on different font settings and zoom. So this is a more global problem -> reassigning to hdu. @hdu, please have a look whether it is possible to get a correct font kerning also if zoom (or map mode) is not exactly 100%. Thanks!
@iha: the problem here is a typical problem. Desc4 in issue 88539 or Desc12 in issue 51508 have good details: You layout the text for 100%, then request it to be displayed at a different zoom level with "I want each glyph positions to be as close as possible to its position in to 100% layout!". Since fonts scale non-linearly on most systems this wish is not compatible with "I want the text to look as natural as if it was layouted for this particular zoom level". Understanding these options is the first step. Then decide what you really want. Maybe it is "I want the text to look as natural as if it was layouted for that magnification level" and "I do not want the text to reflow when the magnification level changes". This means that you would want to layout at 100%, measure the line breaks there and apply them for the different zoom level but with the glyphs at their visually-optimal positions instead of their as-close-as-possible to their 100%-layout positions. This would lead to different problems when the resulting text in a different zoom level runs e.g. into your clipped regions. So, what are the priorities? Optimal readability, optimal WYSIWIG with printing and PDF-export, minimal problems with reflow and clipping, etc.
My priority for the chart would be Optimal readability without strange looking distances between characters. How can I get this? Have I to make some settings on a ref device?
> [...] optimal readability without strange looking distances between characters If a DrawTextArray() is involved then either make sure that neither it's argument pDXArray is not set (==NULL) nor its nLayoutWidth is set (==0). Setting either of these overrides "I want optimal readability" with "trust me that I really know what I am doing by requesting exactly this layout". Since a DrawTextArray() call without these two argument can be replaced with a simple DrawText() you might want to do this.
> DrawTextArray() / DrawText() I do not use these methods, at least not directly. I am creating Text Shapes via UNO API and then I use the Draw View for rendering purposes and also for creation of meta files. So is there a chance for application developers to influence the necessary settings or is this something that maybe needs to be offered first by a core developer? Thanks for your support, Herbert!
Reassigning back as agreed in our debug session: somewhere between chart creation and vcl-drawing some layout adjustments are done that introduce the problem...
I don't think that I can do here something for 3.2 here. The code where things happen is not mine, so this will take bigger investments to dive into. Furthermore there are additional clipping problems with proper text layout. And I haven't expected that the text sizes are that different ... . Shifting target due to missing resources.