Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(712)

Unified Diff: ui/gfx/render_text_pango.cc

Issue 400193004: Unify desktop Linux and Chrome OS font rendering params. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use initializer list Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gfx/platform_font_pango_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gfx/render_text_pango.cc
diff --git a/ui/gfx/render_text_pango.cc b/ui/gfx/render_text_pango.cc
index af0790a03d1834b9249b008f1c495963c35a88de..86a52425a00e60ce9a66a538f61b9a4139fc9be9 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 =
« no previous file with comments | « ui/gfx/platform_font_pango_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698