Bug 103322 - Use floating point for glyph positioning in VCL
Summary: Use floating point for glyph positioning in VCL
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
: 105936 106495 (view as bug list)
Depends on:
Blocks: Font-Rendering 88991
  Show dependency treegraph
 
Reported: 2016-10-18 22:52 UTC by Khaled Hosny
Modified: 2017-05-14 07:24 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Khaled Hosny 2016-10-18 22:52:47 UTC
Currently we use integers and do lots of calculations and recalculations resulting in rounding errors which mess up with text spacing specially at low resolution screens.

We should switch to using floats to store glyph positions instead, which would make the rounding errors less visible. It would also allow us to benefit from sub-pixel positioning support in the graphics libraries we use.
Comment 1 Buovjaga 2017-02-12 16:28:18 UTC
*** Bug 105936 has been marked as a duplicate of this bug. ***
Comment 2 DeepFlight5 2017-02-13 18:13:54 UTC
My Bug 105936 report was moved here. Probably the right place. But here I read "earliest affected version 5.2.2.2 release".

Not true on MacOSX: All LO versions up to 5.2.5 have no problems with glyphs positioning, all work excellent.

This problem begun only with LO 5.3, and there it is on MacOSX massively. I had to downgrade to LO 5.2.5. It's not possible to work with this broken font display.

(On Linux and Windows this might be different.)

The problem is HarfBuzz, which was only introduced in LO 5.3. I hope this gets fixed soon.
Comment 3 Khaled Hosny 2017-02-13 22:41:53 UTC
The underlying issue is as old as this code base, it started showing up on Mac because we no longer use Core Text (which uses floats for glyph positions) and share the same code on all platforms.
Comment 4 DeepFlight5 2017-02-14 19:58:51 UTC Comment hidden (no-value)
Comment 5 Khaled Hosny 2017-03-12 17:01:05 UTC
*** Bug 106495 has been marked as a duplicate of this bug. ***
Comment 6 DeepFlight5 2017-04-07 19:12:46 UTC
Sorry, my commentary from February had an error. It should read:

"I assume the "float" problem lies in the LibreOffice code and not in HarfBuzz, since HarfBuzz is used in Firefox and Chrome also, which have no problems with accurate glyph display. Will this "float" bug of LibreOffice be fixed anywhere soon?"
Comment 7 Khaled Hosny 2017-04-08 14:36:50 UTC
No one is currently working on this, feel free to work on it yourself or recruit someone to work on it.