Bug 1568841 - force GDI parameters for GDI render mode. r=jrmuizel, a=RyanVM
Differential Revision:
https://phabricator.services.mozilla.com/D39529
--- a/gfx/thebes/gfxDWriteFonts.cpp
+++ b/gfx/thebes/gfxDWriteFonts.cpp
@@ -663,17 +663,17 @@ already_AddRefed<ScaledFont> gfxDWriteFo
UsingClearType()
? (forceGDI ? gfxWindowsPlatform::TEXT_RENDERING_GDI_CLASSIC
: gfxWindowsPlatform::TEXT_RENDERING_NORMAL)
: gfxWindowsPlatform::TEXT_RENDERING_NO_CLEARTYPE);
DWRITE_RENDERING_MODE renderingMode = params->GetRenderingMode();
FLOAT gamma = params->GetGamma();
FLOAT contrast = params->GetEnhancedContrast();
- if (forceGDI) {
+ if (forceGDI || renderingMode == DWRITE_RENDERING_MODE_GDI_CLASSIC) {
renderingMode = DWRITE_RENDERING_MODE_GDI_CLASSIC;
gamma = GetSystemGDIGamma();
contrast = 0.0f;
}
const gfxFontStyle* fontStyle = GetStyle();
mAzureScaledFont = Factory::CreateScaledFontForDWriteFont(
mFontFace, fontStyle, GetUnscaledFont(), GetAdjustedSize(),