Closed Bug 1264458 Opened 8 years ago Closed 7 years ago

Color fonts do not render correctly on Linux

Categories

(Core :: Graphics: Text, defect, P3)

defect

Tracking

()

RESOLVED DUPLICATE of bug 1267909

People

(Reporter: mozilla, Unassigned)

References

Details

(Whiteboard: [gfx-noted])

If you install a recent FreeType and fontconfig, Google-style and Apple-style color fonts will be loaded by those libraries.  Cairo so far does not have support for them, so it won't request color, and FreeType will convert the color bitmap to a grayscale bitmap which can be rendered.  Also, fontconfig applies a scale matrix to the color bitmap to render it at the requested size.

In Firefox and Thunderbird however:

  - Color glyphs are loaded as color, but then blended as per-component alpha masks, which results in the wrong color being shown.  I'm confused as to why color is loaded to begin with, because unless someone opted in, neither FreeType nor cairo should return color bitmaps.

In Thunderbird, but not Firefox:

  - While rendering happens at the correct size (ie. fontconfig's matrix is applied), measurement for layout purposes seems to use unscale bitmap size, resulting in wrong layout.

To reproduce, download and install Noto Color Emoji [0], restart Firefox, then go to this page:

  http://emojipedia.org/

[0] http://www.google.com/get/noto/#emoji-qaae-color
The scaling issue also happens in Firefox.  In GMail's inbox view for example.  Not sure how is that different.
Component: General → Graphics: Text
Product: Firefox → Core
Firefox 47 appears to render full-color glyphs.  Layout is still wrong, the downscaling is pretty ugly, and I have to explicitly ask for Noto Color Emoji (otherwise Symbola wins), but it's progress.

Curiously, Nightly still does the blended mask thing.  Not sure what's different about stable.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.