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

Side by Side Diff: ui/gfx/font_list.h

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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef UI_GFX_FONT_LIST_H_ 5 #ifndef UI_GFX_FONT_LIST_H_
6 #define UI_GFX_FONT_LIST_H_ 6 #define UI_GFX_FONT_LIST_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 157
158 // Returns the font weight. 158 // Returns the font weight.
159 Font::Weight GetFontWeight() const; 159 Font::Weight GetFontWeight() const;
160 160
161 // Returns the Font vector. 161 // Returns the Font vector.
162 const std::vector<Font>& GetFonts() const; 162 const std::vector<Font>& GetFonts() const;
163 163
164 // Returns the first font in the list. 164 // Returns the first font in the list.
165 const Font& GetPrimaryFont() const; 165 const Font& GetPrimaryFont() const;
166 166
167 // Returns the first available font name. If there is no available font,
168 // returns the first font name. Empty entries are ignored.
169 // Used by Blink and webui to pick the primary standard/serif/sans/fixed/etc.
170 // fonts from region-specific IDS lists.
171 static std::string FirstAvailableOrFirst(const std::string& font_name_list);
172
167 private: 173 private:
168 explicit FontList(FontListImpl* impl); 174 explicit FontList(FontListImpl* impl);
169 175
170 static const scoped_refptr<FontListImpl>& GetDefaultImpl(); 176 static const scoped_refptr<FontListImpl>& GetDefaultImpl();
171 177
172 scoped_refptr<FontListImpl> impl_; 178 scoped_refptr<FontListImpl> impl_;
173 }; 179 };
174 180
175 } // namespace gfx 181 } // namespace gfx
176 182
177 #endif // UI_GFX_FONT_LIST_H_ 183 #endif // UI_GFX_FONT_LIST_H_
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/fonts/GenericFontFamilySettingsTest.cpp ('k') | ui/gfx/font_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698