Closed Bug 1831298 Opened 2 years ago Closed 2 years ago

Incorrect spacing of transformed synthetic-bold glyphs in print/pdf output

Categories

(Core :: Printing: Output, defect)

defect

Tracking

()

RESOLVED FIXED
114 Branch
Tracking Status
firefox114 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(4 files)

In the course of investigating bug 1823888, I looked at the use of CalcXScale to adjust the synthetic-bold offset in gfxFont::PostShapingFixup, and concluded that it doesn't make sense there.

CalcXScale is used when drawing, to try and determine the appropriate device-pixel offset to use for multiple strikes, but has no relevance to the metrics used for shaping and measurement. We should simply be applying GetSyntheticBoldOffset() here, without further scaling.

The error can be seen with the attached testcase, which uses the Andika font with synthetic bold applied (and negative letter-spacing, which makes it easier to see the problem). View this testcase on macOS; then choose Print / Save to PDF, and view the resulting PDF file. Note the greatly increased glyph spacing in the PDF compared to the screen display (and print preview).

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/57b96b26ef76 Don't apply spurious scaling to the synthetic-bold advance adjustment when shaping text. r=dholbert,emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 114 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: