Chromium Code Reviews| Index: ui/gfx/platform_font_win.cc |
| diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc |
| index 8d8702edabc7d8f0f2b38695cf047be7455e95bf..7d63a71e002bb2ec8543c973d988b69e8670c24c 100644 |
| --- a/ui/gfx/platform_font_win.cc |
| +++ b/ui/gfx/platform_font_win.cc |
| @@ -488,11 +488,17 @@ PlatformFontWin::HFontRef* PlatformFontWin::CreateHFontRefFromSkia( |
| base::SysWideToUTF8(font_info.lfFaceName).c_str(), |
| static_cast<SkTypeface::Style>(skia_style))); |
| - BOOL antialiasing = TRUE; |
| - SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &antialiasing, 0); |
| + gfx::FontRenderParams font_params = |
| + gfx::GetFontRenderParams(gfx::FontRenderParamsQuery(false), nullptr); |
| + SkFontHost::SetSubpixelOrder( |
| + gfx::FontRenderParams::SubpixelRenderingToSkiaLCDOrder( |
| + font_params.subpixel_rendering)); |
| + SkFontHost::SetSubpixelOrientation( |
| + gfx::FontRenderParams::SubpixelRenderingToSkiaLCDOrientation( |
| + font_params.subpixel_rendering)); |
| SkPaint paint; |
| - paint.setAntiAlias(!!antialiasing); |
|
msw
2015/03/26 20:41:26
nit: should font_render_params_win.cc:36 use the !
scottmg
2015/03/26 21:16:17
You meant :63, right? No need, it's non-zero eithe
|
| + paint.setAntiAlias(font_params.antialiasing); |
| paint.setTypeface(skia_face.get()); |
| paint.setTextSize(-font_info.lfHeight); |
| SkPaint::FontMetrics skia_metrics; |