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

Side by Side Diff: chrome/browser/ui/webui/options/font_settings_utils.cc

Issue 2441343003: Allow the default generic font family settings to find the first available font (Closed)
Patch Set: msw review Created 4 years, 1 month 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
OLDNEW
(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
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/options/font_settings_utils.h ('k') | chrome/browser/ui/webui/options/font_settings_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698