diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-18 23:53:56 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-07-18 23:53:56 +0000 |
commit | 2a103aed3c94238145c557e24896253bb37f6ec0 (patch) | |
tree | 20ade9cca3574453475b7752563a6736a2535fad /ui/gfx/render_text_pango.cc | |
parent | 1b1daf742de6bf001c8159627fb1415abb767b5b (diff) | |
download | chromium_src-2a103aed3c94238145c557e24896253bb37f6ec0.zip chromium_src-2a103aed3c94238145c557e24896253bb37f6ec0.tar.gz chromium_src-2a103aed3c94238145c557e24896253bb37f6ec0.tar.bz2 |
Unify desktop Linux and Chrome OS font rendering params.
Use the same path to get font rendering settings on desktop
Linux and Chrome OS: query the LinuxFontDelegate if it's set
and then query Fontconfig.
Also make the LinuxFontDelegate interface return a
PangoFontDescription directly (as opposed to an opaque
string that's actually a stringified PangoFontDescription)
and make it return a cached FontRenderParams struct instead
of exposing separate methods for looking up individual
properties.
Finally, add a missing build dependency on ui_test_pak, which
is needed to get the default font resource when running
gfx_unittests on Chrome OS.
BUG=125235,393067
Review URL: https://codereview.chromium.org/400193004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@284255 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gfx/render_text_pango.cc')
-rw-r--r-- | ui/gfx/render_text_pango.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/gfx/render_text_pango.cc b/ui/gfx/render_text_pango.cc index af0790a..86a5242 100644 --- a/ui/gfx/render_text_pango.cc +++ b/ui/gfx/render_text_pango.cc @@ -355,9 +355,11 @@ void RenderTextPango::SetupPangoAttributes(PangoLayout* layout) { const size_t italic_end = styles()[ITALIC].GetRange(italic).end(); const size_t style_end = std::min(bold_end, italic_end); if (style != font_list().GetFontStyle()) { + // TODO(derat): Don't interpret gfx::FontList font descriptions as Pango + // font descriptions: http://crbug.com/393067 FontList derived_font_list = font_list().DeriveWithStyle(style); - ScopedPangoFontDescription desc(pango_font_description_from_string( - derived_font_list.GetFontDescriptionString().c_str())); + ScopedPangoFontDescription desc( + derived_font_list.GetFontDescriptionString()); PangoAttribute* pango_attr = pango_attr_font_desc_new(desc.get()); pango_attr->start_index = |