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

Unified Diff: ui/base/webui/web_ui_util.cc

Issue 236723005: Restore usage of system default font in webui pages on desktop linux (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/webui/web_ui_util.cc
diff --git a/ui/base/webui/web_ui_util.cc b/ui/base/webui/web_ui_util.cc
index aba0009dc141dae437e6f11dd4b95cb29c78149e..c69ab58be01edeaf4e52a757288608bcd1c51329 100644
--- a/ui/base/webui/web_ui_util.cc
+++ b/ui/base/webui/web_ui_util.cc
@@ -140,6 +140,11 @@ void SetFontAndTextDirection(base::DictionaryValue* localized_strings) {
std::string font_family = l10n_util::GetStringUTF8(web_font_family_id);
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+ font_family = ui::ResourceBundle::GetSharedInstance().GetFont(
+ ui::ResourceBundle::BaseFont).GetFontName() + ", " + font_family;
+#endif
Nico 2014/04/14 18:30:44 Elsewhere we do this by adjusting IDS_WEB_FONT_FAM
+
localized_strings->SetString("fontfamily", font_family);
localized_strings->SetString("fontsize",
l10n_util::GetStringUTF8(web_font_size_id));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698