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

VERIFIED FIXED in Firefox 46

Status

()

Core
Graphics: Text
VERIFIED FIXED
2 years ago
2 years ago

People

(Reporter: Nikolay Martynov, 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

2 years ago
Created attachment 8722837 [details]
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

2 years ago
Created attachment 8722838 [details]
cairo
(Reporter)

Updated

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

Updated

2 years ago
Component: Untriaged → Graphics: Text
Product: Firefox → Core
(Reporter)

Comment 2

2 years ago
Correction:

Expected results:

Fonts should be rendered properly with _skia_ enabled
(Assignee)

Updated

2 years ago
Whiteboard: [gfx-noted]
(Assignee)

Comment 3

2 years ago
Created 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

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

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

Comment 4

2 years ago
Try run: https://treeherder.mozilla.org/#/jobs?repo=try&revision=1ee88149b038

Comment 5

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/2af0755ca438

Comment 6

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

Comment 7

2 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+

Comment 9

2 years ago
bugherderuplift
https://hg.mozilla.org/releases/mozilla-aurora/rev/4bcaf34af49e
status-firefox46: --- → fixed
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
status-firefox46: fixed → verified
status-firefox47: fixed → verified
You need to log in before you can comment on or make changes to this bug.