summaryrefslogtreecommitdiffstats
path: root/ui/gfx/pango_util.cc
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-09 21:27:00 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-09 21:27:00 +0000
commit4cabe55b01920321bd7183f60058a2887e95da0e (patch)
treeaa7fd91a0287c279d04c5217fd6376dd9d148d42 /ui/gfx/pango_util.cc
parentc298e4128296f5ff90f959497461f2064b2f1211 (diff)
downloadchromium_src-4cabe55b01920321bd7183f60058a2887e95da0e.zip
chromium_src-4cabe55b01920321bd7183f60058a2887e95da0e.tar.gz
chromium_src-4cabe55b01920321bd7183f60058a2887e95da0e.tar.bz2
aura: Switch to light hinting for UI text.
The eternal debate continues... This makes us use light hinting instead of strong hinting for Pango-Cairo-rendered text in the UI (including the tab strip and the wrench menu), which improves the shaping of glyphs like 'B' and 'T'. On the other hand, it makes color fringes more noticeable, although the effect is worse on e.g. my Dell 2405FPW than on Lumpy. I believe that the long-term plan is to instead draw this text using Skia and improve subpixel rendering there. The change also has the added-but-unintended benefit of fixing some off-by-one misplacement of glyphs in the omnibox that I believe we picked up when we switched from GTK+ to Aura Views. (I tried medium hinting as well, but it's identical to strong hinting.) For before-and-after, see http://www/~derat/no_crawl/20120309/tabs.png and http://www/~derat/no_crawl/20120309/menu.png. BUG=116296,117268 TEST=manual inspection on lumpy Review URL: http://codereview.chromium.org/9664007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@125906 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/pango_util.cc')
-rw-r--r--ui/gfx/pango_util.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/ui/gfx/pango_util.cc b/ui/gfx/pango_util.cc
index 461d451..c56d775 100644
--- a/ui/gfx/pango_util.cc
+++ b/ui/gfx/pango_util.cc
@@ -107,15 +107,16 @@ cairo_font_options_t* GetCairoFontOptions() {
if (rgba_style)
g_free(rgba_style);
#else
- // For non-GTK builds (read: Aura), use the same settings that were previously
- // used for GTK Chrome OS builds: RGB subpixel rendering with strong hinting.
- // Note: We should probably be getting per-font settings from FontConfig here,
- // but this path will be made obsolete by http://crbug.com/105550.
+ // For non-GTK builds (read: Aura), use RGB subpixel rendering with light
+ // hinting. Note: We should probably be getting per-font settings from
+ // FontConfig here, but this path will be made obsolete by
+ // http://crbug.com/105550.
cairo_font_options_set_antialias(cairo_font_options,
CAIRO_ANTIALIAS_SUBPIXEL);
cairo_font_options_set_subpixel_order(cairo_font_options,
CAIRO_SUBPIXEL_ORDER_RGB);
- cairo_font_options_set_hint_style(cairo_font_options, CAIRO_HINT_STYLE_FULL);
+ cairo_font_options_set_hint_style(cairo_font_options,
+ CAIRO_HINT_STYLE_SLIGHT);
#endif
return cairo_font_options;