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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/base/webui/web_ui_util.h" 5 #include "ui/base/webui/web_ui_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 #if defined(OS_WIN) 133 #if defined(OS_WIN)
134 // Vary font settings for Windows XP. 134 // Vary font settings for Windows XP.
135 if (base::win::GetVersion() < base::win::VERSION_VISTA) { 135 if (base::win::GetVersion() < base::win::VERSION_VISTA) {
136 web_font_family_id = IDS_WEB_FONT_FAMILY_XP; 136 web_font_family_id = IDS_WEB_FONT_FAMILY_XP;
137 web_font_size_id = IDS_WEB_FONT_SIZE_XP; 137 web_font_size_id = IDS_WEB_FONT_SIZE_XP;
138 } 138 }
139 #endif 139 #endif
140 140
141 std::string font_family = l10n_util::GetStringUTF8(web_font_family_id); 141 std::string font_family = l10n_util::GetStringUTF8(web_font_family_id);
142 142
143 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
144 font_family = ui::ResourceBundle::GetSharedInstance().GetFont(
145 ui::ResourceBundle::BaseFont).GetFontName() + ", " + font_family;
146 #endif
Nico 2014/04/14 18:30:44 Elsewhere we do this by adjusting IDS_WEB_FONT_FAM
147
143 localized_strings->SetString("fontfamily", font_family); 148 localized_strings->SetString("fontfamily", font_family);
144 localized_strings->SetString("fontsize", 149 localized_strings->SetString("fontsize",
145 l10n_util::GetStringUTF8(web_font_size_id)); 150 l10n_util::GetStringUTF8(web_font_size_id));
146 localized_strings->SetString("textdirection", 151 localized_strings->SetString("textdirection",
147 base::i18n::IsRTL() ? "rtl" : "ltr"); 152 base::i18n::IsRTL() ? "rtl" : "ltr");
148 } 153 }
149 154
150 } // namespace webui 155 } // namespace webui
OLDNEW
« 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