[Libreoffice-bugs] [Bug 142940] Enabling pair kerning breaks rendering of many common fonts

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sun Jun 20 00:29:59 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=142940

--- Comment #1 from adam.m.fontenot+docfo at gmail.com ---
Follow up: Looking at
https://bugs.documentfoundation.org/show_bug.cgi?id=103322 again, it's worth
pointing out that if I'm reading the following correctly, LibreOffice is not
using subpixel positioning at all.

> 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.

Indeed, from testing this appears to be the case. If you look at the screenshot
I'm about to attach, you'll see that each glyph on the first line has exactly
the same subpixel offset as the corresponding glyph on the second line. This
isn't the case with a properly behaving FreeType renderer (tested in KWrite).

That's why the result of that bug is a bunch of bad glyph positioning problems.
If you type a repeated character like "mmmmmmm", the text layout engine will
(in 12 pt Arial) put each "m" slightly too close together because it lacks
subpixel positioning. Eventually it has to fix the word length and so it puts a
extra 1 pixel gap between two "m"s. Looks ugly:
https://bugs.documentfoundation.org/show_bug.cgi?id=88991

The thing is, so long as LibreOffice doesn't support subpixel positioning, it's
not surprising that pair kerning might make these rendering issues much worse.
Most kerning operations are relatively subtle, and when your renderer doesn't
support subpixel positioning at all, it's not surprising that that the engine
goes nuts and gives you nonsense results (like characters colliding) when asked
to make small adjustment to the glyph position.

If that turns out to be what's happening here, I think that's a further
argument for defaulting it to off.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210620/1b498b5a/attachment.htm>


More information about the Libreoffice-bugs mailing list