Closed Bug 1546985 Opened 5 months ago Closed 5 months ago

Odd jaggies when rendering lowercase w in helvetica with stroke.

Categories

(Core :: Graphics: Text, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: bwinton, Assigned: jfkthame)

References

()

Details

Attachments

(1 file)

c, v, and 4 are also a little odd…

(Andrew Osmond said that you might know something about this, @jkew? 🙂)

Oh, other info:

  • macOS 10.14.4 (18E226)
  • Firefox Nightly 68.0a1 (2019-04-25) (64-bit)
  • Fails with Webrender both on and off.

Huh, also fails on Safari, so maybe not something we can do much about?

Flags: needinfo?(jkew)

Not specific to Helvetica, FWIW; try other sans-serifs like Arial or Impact.

It's a bit tricky to decide how best to handle sharp angles when stroking a path; see discussion of rounded vs beveled vs mitered joins, e.g. in cairo documentation, and parameters like the "miter limit". Possibly defaulting to rounded instead of mitered joins when stroking glyphs would be a safer option, although it's not obvious that there is any one "perfect" choice; alternatively, we could at least try reducing the miter limit.

Flags: needinfo?(jkew)
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Priority: -- → P3
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bd68b6dfd83e
Use JoinStyle::ROUND when stroking glyph outlines, to avoid artifacts at sharp corners. r=lsalzman

Oops - I forgot we have reftests that compare -webkit-text-stroke against SVG stroking, sorry. So we'll need to add stroke-linejoin=round to the SVG references there in order to match the rendering. I'll push that fix through try before re-landing.

Flags: needinfo?(jfkthame)
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0c0d1b6e9055
Use JoinStyle::ROUND when stroking glyph outlines, to avoid artifacts at sharp corners. r=lsalzman
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.