OLD | NEW |
---|---|
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 Loading... | |
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 |
OLD | NEW |