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