synthetic bolding on Android (gfxFT2Fonts) does not adjust glyph metrics properly

RESOLVED FIXED in mozilla9

Status

()

Core
Graphics
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

Trunk
mozilla9
ARM
Android
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
When we use double-striking (with an offset) to simulate bold for font families that don't have a real bold face, we're supposed to add a corresponding delta to the glyph advances, so as to maintain reasonable inter-glyph spacing.

However, the code in gfxFT2Font::InitTextRun() calls AdjustAdvancesForSyntheticBold in the wrong place, with the result that it doesn't have any effect. This means that synthetic-bold glyphs appear crowded together, as can be seen in the test case at http://people.mozilla.com/~jkew/synbold.html; this is particularly noticeable when the page is zoomed out, so that the font size is small.
(Assignee)

Comment 1

6 years ago
Created attachment 557202 [details] [diff] [review]
patch, move AdjustAdvancesForSyntheticBold to the right place

With this patch, the synthetic-bold text in the testcase looks much better and more readable, as it has proper inter-glyph spacing.
Attachment #557202 - Flags: review?(jdaggett)

Comment 2

6 years ago
Comment on attachment 557202 [details] [diff] [review]
patch, move AdjustAdvancesForSyntheticBold to the right place

Yeah, I was wondering about this when looking at bug 674909.
Attachment #557202 - Flags: review?(jdaggett) → review+
(Assignee)

Comment 3

6 years ago
Incidentally, we already have a reftest that checks this (layout/reftests/text/synthetic-bold-metrics-01.html), but it's marked as failing on android - on a tryserver run with this patch, it "unexpectedly" passes. :)
(Assignee)

Updated

6 years ago
Blocks: 674909
(Assignee)

Comment 4

6 years ago
Pushed to inbound, including updating the reftest manifest because the test now passes:
http://hg.mozilla.org/integration/mozilla-inbound/rev/c1281875cfea
(Assignee)

Updated

6 years ago
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/c1281875cfea
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
(Assignee)

Updated

6 years ago
Whiteboard: [inbound]
You need to log in before you can comment on or make changes to this bug.