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 16 matching lines...) Expand all Loading... |
27 // http://developer.gnome.org/pango/stable/pango-Fonts.html#pango-font-descripti
on-from-string | 27 // http://developer.gnome.org/pango/stable/pango-Fonts.html#pango-font-descripti
on-from-string |
28 // | 28 // |
29 // FontList could be initialized either way without conversion to the other | 29 // FontList could be initialized either way without conversion to the other |
30 // form. The conversion to the other form is done only when asked to get the | 30 // form. The conversion to the other form is done only when asked to get the |
31 // other form. | 31 // other form. |
32 // | 32 // |
33 // FontList allows operator= since FontList is a data member type in RenderText, | 33 // FontList allows operator= since FontList is a data member type in RenderText, |
34 // and operator= is used in RenderText::SetFontList(). | 34 // and operator= is used in RenderText::SetFontList(). |
35 class GFX_EXPORT FontList { | 35 class GFX_EXPORT FontList { |
36 public: | 36 public: |
37 // Creates a font list with a Font with default name and style. | 37 // Creates a font list with default font names, size and style, which are |
| 38 // specified by SetDefaultFontDescription(). |
38 FontList(); | 39 FontList(); |
39 | 40 |
40 // Creates a font list from a string representing font names, styles, and | 41 // Creates a font list from a string representing font names, styles, and |
41 // size. | 42 // size. |
42 explicit FontList(const std::string& font_description_string); | 43 explicit FontList(const std::string& font_description_string); |
43 | 44 |
44 // Creates a font list from font names, styles and size. | 45 // Creates a font list from font names, styles and size. |
45 FontList(const std::vector<std::string>& font_names, | 46 FontList(const std::vector<std::string>& font_names, |
46 int font_style, | 47 int font_style, |
47 int font_size); | 48 int font_size); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 mutable int common_baseline_; | 147 mutable int common_baseline_; |
147 | 148 |
148 // Cached font style and size. | 149 // Cached font style and size. |
149 mutable int font_style_; | 150 mutable int font_style_; |
150 mutable int font_size_; | 151 mutable int font_size_; |
151 }; | 152 }; |
152 | 153 |
153 } // namespace gfx | 154 } // namespace gfx |
154 | 155 |
155 #endif // UI_GFX_FONT_LIST_H_ | 156 #endif // UI_GFX_FONT_LIST_H_ |
OLD | NEW |