| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2016 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_list.h" | |
| 8 | |
| 9 namespace options { | |
| 10 | |
| 11 std::string FontSettingsUtilities::ResolveFontList( | |
| 12 const std::string& font_name_or_list) { | |
| 13 if (!font_name_or_list.empty() && font_name_or_list[0] == ',') | |
| 14 return gfx::FontList::FirstAvailableOrFirst(font_name_or_list); | |
| 15 return font_name_or_list; | |
| 16 } | |
| 17 | |
| 18 #if !defined(OS_WIN) | |
| 19 std::string FontSettingsUtilities::MaybeGetLocalizedFontName( | |
| 20 const std::string& font_name_or_list) { | |
| 21 return ResolveFontList(font_name_or_list); | |
| 22 } | |
| 23 #endif | |
| 24 | |
| 25 } // namespace options | |
| OLD | NEW |