Open Bug 1717824 Opened 4 years ago Updated 10 months ago

GrayScale AA if css -webkit-text-stroke-width is applied

Categories

(Core :: Graphics: WebRender, defect, P4)

Desktop
Windows 10
defect

Tracking

()

Tracking Status
firefox91 --- affected

People

(Reporter: alice0775, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(Keywords: nightly-community)

Attachments

(2 files)

See attached screenshot.
GrayScale if css -webkit-text-stroke-width is applied.

If disable WebRender, it is SubPixel AA.

Attached image screenshot

Jonathan, are we doing something incorrect with our text aliasing in WebRender?

Flags: needinfo?(jfkthame)
Severity: -- → S4
Priority: -- → P4

Curious - looking at the screenshot, it appears there are three different behaviors here. In all three examples, the unstroked glyphs have subpixel AA, but when the stroke is applied, the results in each case differ:

  • WR: no subpixel AA on the stroked glyphs
  • Basic: the stroked glyphs still have full subpixel AA
  • D3D11: there's subpixel AA but it appears to be reduced, my guess would be that the glyph is being filled with subpixel AA, but then stroked without, so that as the stroke gets thicker, it obscures an increasing amount of the subpixel color fringing.

I don't know how glyph-stroke is implemented through webrender -- if it's done by getting the glyph path from the font, and then stroking this like any other path, presumably we don't do subpixel AA for generic path stroking. But in that case I'd kinda expect a result like the D3D11 screenshot, where we can still see a bit of the subpixel AA from painting the filled glyph "underneath" the stroke.

So it'd be interesting to know where the decision happens that seems to completely disable subpixel AA when a stroke is present. On the gfx/thebes side I'm not aware of a reason for this. Maybe Lee knows where that could be happening?

Flags: needinfo?(jfkthame) → needinfo?(lsalzman)

Stroking in WR causes a fallback to a blob image up in layout, since WR itself can't handle the glyph stroking (as with other path rendering). Once in blob image land, there is no subpixel AA...

Flags: needinfo?(lsalzman)

Ah, that makes sense. So this is expected, and probably not something we're aiming to fix any time soon, at least.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: