Closed Bug 1272814 Opened 8 years ago Closed 8 years ago

Use the dwrite default rendering contrast unless the contrast preference is set

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: mchang, Assigned: mchang)

References

Details

(Keywords: feature, Whiteboard: [gfx-noted])

Attachments

(1 file)

Right now we seem to overwrite the default contrast for clear type params unless it's been explicitly set with a registry key [1]. However from [2], this parameter doesn't seem to be honored by d2d. Since this isn't honored, we probably don't need to explicitly set the contrast in this case.

[1] https://dxr.mozilla.org/mozilla-central/source/gfx/thebes/gfxWindowsPlatform.cpp?from=gfxWindowsPlatform.cpp#1337
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=1270688#c3
Unless we have a good reason to keep the contrast explicitly at 1.0?
Attachment #8752400 - Flags: review?(bas)
Attachment #8752400 - Flags: review?(bas) → review+
After digging through this more, if we don't explicitly set the contrast to 1.0, most text generally looks "lighter" than what we currently have now. I can't directly compare with IE on Windows 8 and 10 because subpixel AA is off on those platforms, but on Windows 7, a contrast of 1.0 more closely matches IE for most sites.

With skia, we have a couple of problems. First is that it generates the glyphs with CreateAlphaTexture, which ignores contrast. Just converting those bits into a bitmap and displaying them outside of gecko show that the font is considerably blurrier and thicker than displaying the same GlyphRun through a RenderingTarget. Currently using the default rendering params gamma + contrast through skia's alpha blending, text is both lighter and darker depending on the css font-weight property. On some sites, it's the same. Considering that we still expect to keep d2d as the default backend on Windows, I took a look at layers acceleration disabled text and compared it to d2d.

In those cases, we use GDI and the fonts are very different compared to dwrite. Most of the spacing is off, but the contrast / gamma looks about the same, but the most visually jarring part is that spacing between glyphs is very different.

Since realistically the only time we'd use Skia + dwrite fonts is when we get a TDR and can't recover d2d but still already have dwrite fonts, I think it's ok to just leave our fonts for d2d as is and have skia fonts be good enough. If we can't get d2d on initial startup, we won't use dwrite fonts anyway.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: