Bug 1569174 - disable embedded bitmaps if ClearType rendering mode is forced. r=jfkthame

Differential Revision: https://phabricator.services.mozilla.com/D39749

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Lee Salzman 2019-07-30 02:55:48 +00:00
parent 8f8a996570
commit 9a69d270c0

View File

@ -654,8 +654,6 @@ already_AddRefed<ScaledFont> gfxDWriteFont::GetScaledFont(
}
if (!mAzureScaledFont) {
gfxDWriteFontEntry* fe = static_cast<gfxDWriteFontEntry*>(mFontEntry.get());
bool useEmbeddedBitmap =
fe->IsCJKFont() && HasBitmapStrikeForSize(NS_lround(mAdjustedSize));
bool forceGDI = GetForceGDIClassic();
IDWriteRenderingParams* params =
@ -674,6 +672,11 @@ already_AddRefed<ScaledFont> gfxDWriteFont::GetScaledFont(
contrast = 0.0f;
}
bool useEmbeddedBitmap =
(renderingMode == DWRITE_RENDERING_MODE_DEFAULT ||
renderingMode == DWRITE_RENDERING_MODE_GDI_CLASSIC) &&
fe->IsCJKFont() && HasBitmapStrikeForSize(NS_lround(mAdjustedSize));
const gfxFontStyle* fontStyle = GetStyle();
mAzureScaledFont = Factory::CreateScaledFontForDWriteFont(
mFontFace, fontStyle, GetUnscaledFont(), GetAdjustedSize(),