Bug 1477625 - Don't use subpixel positioning for GDI fonts in WebRender. r=jrmuizel

This commit is contained in:
Lee Salzman 2018-09-12 13:34:08 -04:00
parent 0ab0b6dae2
commit 199ddffb5d

View File

@ -481,7 +481,7 @@ ScaledFontDWrite::GetWRFontInstanceOptions(Maybe<wr::FontInstanceOptions>* aOutO
{
wr::FontInstanceOptions options;
options.render_mode = wr::ToFontRenderMode(GetDefaultAAMode());
options.flags = wr::FontInstanceFlags::SUBPIXEL_POSITION;
options.flags = 0;
if (mFontFace->GetSimulations() & DWRITE_FONT_SIMULATIONS_BOLD) {
options.flags |= wr::FontInstanceFlags::SYNTHETIC_BOLD;
}
@ -490,6 +490,8 @@ ScaledFontDWrite::GetWRFontInstanceOptions(Maybe<wr::FontInstanceOptions>* aOutO
}
if (ForceGDIMode()) {
options.flags |= wr::FontInstanceFlags::FORCE_GDI;
} else {
options.flags |= wr::FontInstanceFlags::SUBPIXEL_POSITION;
}
options.bg_color = wr::ToColorU(Color());
options.synthetic_italics = wr::DegreesToSyntheticItalics(GetSyntheticObliqueAngle());