| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/ui/webui/options/font_settings_utils.h" | |
| 6 | |
| 7 #include "ui/gfx/font.h" | |
| 8 #include "ui/gfx/platform_font_win.h" | |
| 9 | |
| 10 namespace options { | |
| 11 | |
| 12 // static | |
| 13 void FontSettingsUtilities::ValidateSavedFonts(PrefService* prefs) { | |
| 14 // Nothing to do for Windows. | |
| 15 } | |
| 16 | |
| 17 std::string FontSettingsUtilities::MaybeGetLocalizedFontName( | |
| 18 const std::string& font_name_or_list) { | |
| 19 std::string font_name = ResolveFontList(font_name_or_list); | |
| 20 if (font_name.empty()) | |
| 21 return font_name; | |
| 22 gfx::Font font(font_name, 12); // dummy font size | |
| 23 return static_cast<gfx::PlatformFontWin*>(font.platform_font()) | |
| 24 ->GetLocalizedFontName(); | |
| 25 } | |
| 26 | |
| 27 } // namespace options | |
| OLD | NEW |