Closed Bug 1611610 Opened 6 years ago Closed 6 years ago

synthetic-bold effect should not increase the advance of zero-width glyphs

Categories

(Core :: Layout: Text and Fonts, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

Details

Attachments

(2 files)

Generally, when synthetic bold is applied (because font-weight calls for bold, but no actual bold face is available for the font family in use), glyph advances are increased to account for the "fattening" of the glyphs.

However, for zero-width glyphs we shouldn't do this; if a glyph has an advance width of zero, it is expected that it will not result in any extra space between its neighbors, and we should maintain that behavior even when synthetic bold is involved.

(Note that this is specific to platforms where we use gecko's built-in "synthetic bold by multi-striking" implementation; where we're using a platform font backend's synthetic bold (such as DirectWrite "simulations") we simply use whatever glyph advances it gives us.)

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED

The above reftest fails on macOS without the patch, due to this bug; I think this may currently be our only affected platform. (Checking on tryserver whether the test passes as expected everywhere else.)

Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ed3330607ac3 Don't increase glyph advance for synthetic bold if the glyph is zero-width. r=lsalzman https://hg.mozilla.org/integration/autoland/rev/66c0610ae7ce Add reftest for effect of synthetic bold on metrics of zero-width glyph. r=lsalzman
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: