| Index: ui/gfx/font_render_params_linux.cc
|
| diff --git a/ui/gfx/font_render_params_linux.cc b/ui/gfx/font_render_params_linux.cc
|
| index e8e60e3e68ac7061e9ee5b4e4fc20c2eff196dab..f7c1119c703ae80503450342931223673142ce67 100644
|
| --- a/ui/gfx/font_render_params_linux.cc
|
| +++ b/ui/gfx/font_render_params_linux.cc
|
| @@ -128,15 +128,25 @@ FontRenderParams GetFontRenderParams(const FontRenderParamsQuery& query,
|
| params = delegate->GetDefaultFontRenderParams();
|
| QueryFontconfig(query, ¶ms, family_out);
|
|
|
| - // Fontconfig doesn't support configuring subpixel positioning; check a flag.
|
| - params.subpixel_positioning = CommandLine::ForCurrentProcess()->HasSwitch(
|
| - query.for_web_contents ?
|
| - switches::kEnableWebkitTextSubpixelPositioning :
|
| - switches::kEnableBrowserTextSubpixelPositioning);
|
| -
|
| - // To enable subpixel positioning, we need to disable hinting.
|
| - if (params.subpixel_positioning)
|
| - params.hinting = FontRenderParams::HINTING_NONE;
|
| + if (!params.antialiasing) {
|
| + // Cairo forces full hinting when antialiasing is disabled, since anything
|
| + // less than that looks awful; do the same here. Requesting subpixel
|
| + // rendering or positioning doesn't make sense either.
|
| + params.hinting = FontRenderParams::HINTING_FULL;
|
| + params.subpixel_rendering = FontRenderParams::SUBPIXEL_RENDERING_NONE;
|
| + params.subpixel_positioning = false;
|
| + } else {
|
| + // Fontconfig doesn't support configuring subpixel positioning; check a
|
| + // flag.
|
| + params.subpixel_positioning = CommandLine::ForCurrentProcess()->HasSwitch(
|
| + query.for_web_contents ?
|
| + switches::kEnableWebkitTextSubpixelPositioning :
|
| + switches::kEnableBrowserTextSubpixelPositioning);
|
| +
|
| + // To enable subpixel positioning, we need to disable hinting.
|
| + if (params.subpixel_positioning)
|
| + params.hinting = FontRenderParams::HINTING_NONE;
|
| + }
|
|
|
| // Use the first family from the list if Fontconfig didn't suggest a family.
|
| if (family_out && family_out->empty() && !query.families.empty())
|
|
|