Closed Bug 683618 Opened 13 years ago Closed 13 years ago

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

Categories

(Core :: Graphics, defect)

ARM
Android
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: jfkthame, Assigned: jfkthame)

References

()

Details

Attachments

(1 file)

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.
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 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+
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. :)
Blocks: 674909
Pushed to inbound, including updating the reftest manifest because the test now passes:
http://hg.mozilla.org/integration/mozilla-inbound/rev/c1281875cfea
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/c1281875cfea
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
Whiteboard: [inbound]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: