Color fonts do not render correctly on Linux

RESOLVED DUPLICATE of bug 1267909

Status

()

Core
Graphics: Text
P3
normal
RESOLVED DUPLICATE of bug 1267909
2 years ago
5 months ago

People

(Reporter: Behdad Esfahbod, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [gfx-noted])

(Reporter)

Description

2 years ago
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
(Reporter)

Comment 1

2 years ago
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
(Reporter)

Updated

2 years ago
Duplicate of this bug: 1170478
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.
(Reporter)

Updated

a year ago
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1267909
You need to log in before you can comment on or make changes to this bug.