[Skia] Font renders with uneven spaces with skia enabled (linux)

VERIFIED FIXED in Firefox 46

Status

()

defect
VERIFIED FIXED
3 years ago
3 years ago

People

(Reporter: mar.kolya, Assigned: lsalzman)

Tracking

47 Branch
mozilla47
x86_64
Linux
Points:
---
Bug Flags:
qe-verify +

Firefox Tracking Flags

(firefox46 verified, firefox47 verified)

Details

(Whiteboard: [gfx-noted])

Attachments

(3 attachments)

Reporter

Description

3 years ago
Posted image skia
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0
Build ID: 20160126143540

Steps to reproduce:

I've switched skia instead of cairo in gfx.canvas.azure.backends and gfx.content.azure.backends.


Actual results:

Fonts get rendered in a weird way: both on pages and FF UI. Most noticeable is that spacing between letters is often uneven. But also it looks like some parts of some letters is shifted to be 'between' pixels making them render only partly.
I'm attaching screenshots with skia and cairo on same FF instance.


Expected results:

Fonts should be rendered properly with cairo enabled
Reporter

Comment 1

3 years ago
Posted image cairo
Reporter

Updated

3 years ago
OS: Unspecified → Linux
Hardware: Unspecified → x86_64

Updated

3 years ago
Component: Untriaged → Graphics: Text
Product: Firefox → Core
Reporter

Comment 2

3 years ago
Correction:

Expected results:

Fonts should be rendered properly with _skia_ enabled
Assignee

Updated

3 years ago
Whiteboard: [gfx-noted]
Assignee

Comment 3

3 years ago
The way Skia renders Freetype fonts with subpixel positioning depends on adding in the subpixel offsets before the metrics are then snapped to integral values. Since Cairo does not internally do this offsetting before snapping, our metrics and Skia's would disagree if we enabled it for Cairo.

Thus, we have to disable subpixel text for Cairo/Freetype fonts until such time as we can revise our font metric code to not exclusively depend on Cairo.
Assignee: nobody → lsalzman
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8723352 - Flags: review?(mchang)
Assignee

Updated

3 years ago
See Also: → 1230357
Attachment #8723352 - Flags: review?(mchang) → review+

Comment 6

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/2af0755ca438
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Assignee

Comment 7

3 years ago
Comment on attachment 8723352 [details] [diff] [review]
ensure that subpixel text is disabled for Skia's Cairo font host so that font rendering matches our font metrics

Approval Request Comment
[Feature/regressing bug #]: bug 1230357 (46+)
[User impact if declined]: If people have enabled Skia content on Linux, they would notice a regression in font positioning. While Skia content is not enabled by default, some people are using it already instead of Cairo.
[Describe test coverage new/current, TreeHerder]: mochitest, reftest
[Risks and why]: Basically none, since this patch only makes us render fonts on Linux + Skia as we did before bug 1230357
[String/UUID change made/needed]: None
Attachment #8723352 - Flags: approval-mozilla-aurora?
Comment on attachment 8723352 [details] [diff] [review]
ensure that subpixel text is disabled for Skia's Cairo font host so that font rendering matches our font metrics

Fix for a regression from 46, ok to uplift.
Attachment #8723352 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Flags: qe-verify+
This bug is verified fixed on:
- 46.0b6-build1 (20160328182534),
- 47.0a2 (2016-03-30),
- 48.0a1 (2016-03-30),
using Ubuntu 14.04 x64 and Ubuntu 12.04 x64.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.