Closed Bug 1409188 Opened 7 years ago Closed 7 years ago

Skia mishandles FreeType 2.8.1 patent-free subpixel rendering

Categories

(Thunderbird :: General, defect)

All
Linux
defect
Not set
major

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1393467

People

(Reporter: bigon, Unassigned)

Details

+++ This bug was initially created as a clone of Bug #1400721 +++

As noted at https://sourceforge.net/projects/freetype/files/freetype2/2.8.1/, FreeType 2.8.1 ships with a new LCD subpixel rendering technique called Harmony that evades the ClearType patents by not requiring (and supporting) filtering:

>  - By default, FreeType now offers high quality LCD-optimized
>    output without resorting to ClearType techniques of resolution
>    tripling and filtering. In this method, called Harmony, each
>    color channel is generated separately after shifting the glyph
>    outline, capitalizing on the fact that the color grids on LCD
>    panels are shifted by a third of a pixel. This output is
>    indistinguishable from ClearType with a light 3-tap filter. 

This technique is enabled by default, and the code urges packagers not to enable the (still available) patented rendering mode.


FreeType 2.8.1 also changed how the padding for LCD bitmaps is calculated:

>  - The internal representation of buffers for LCD rendering has
>    changed (to be more precise, the amount of padding gets computed
>    differently). Applications that use the FreeType API are not
>    affected.

Skia breaks FreeType's API by replacing the rendering buffer with its own. As a result, text rendering broke with some glyphs being shifted and cut off. The padding change happened before the introduction of Harmony; Skia implemented a workaround that was effective for the patented mode. The upstream bug for this is https://bugs.chromium.org/p/skia/issues/detail?id=6663. Firefox received a backport of this in bug 1393467.

Unfortunately rendering breaks again with similar results when FreeType is compiled with the patent-free mode.
Laurent,
Thunderbird picks up the code of bug 1400721, no?  
So then what is the point of this bug report?
Component: Untriaged → General
Flags: needinfo?(bigon)
Priority: P3 → --
Yeah, I don't know the flow of the propagations of the patches between the projects.

Feel free to close this bug then (or to keep it as a tracker as we get some reports in debian about this)
Flags: needinfo?(bigon)
This is fixed in core graphics code which is used by Thunderbird. So this is already fixed in Thunderbird nightly, and will be fixed in the next 52.x version of Thunderbird
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.