Chromium Code Reviews| Index: ui/gfx/font_list_impl.h |
| diff --git a/ui/gfx/font_list_impl.h b/ui/gfx/font_list_impl.h |
| index cd8e58c9110ce772b96aa9381a1389b0b697ada0..40e2605defdcc12aae98ddead69e6b15188f787f 100644 |
| --- a/ui/gfx/font_list_impl.h |
| +++ b/ui/gfx/font_list_impl.h |
| @@ -9,6 +9,7 @@ |
| #include <vector> |
| #include "base/memory/ref_counted.h" |
| +#include "ui/gfx/font.h" |
| namespace gfx { |
| @@ -32,10 +33,11 @@ class FontListImpl : public base::RefCounted<FontListImpl> { |
| // size. |
| explicit FontListImpl(const std::string& font_description_string); |
| - // Creates a font list from font names, styles and size. |
| + // Creates a font list from font names, styles, size and weight. |
| FontListImpl(const std::vector<std::string>& font_names, |
| int font_style, |
| - int font_size); |
| + int font_size, |
| + int font_weight); |
| // Creates a font list from a Font vector. |
| // All fonts in this vector should have the same style and size. |
| @@ -47,8 +49,10 @@ class FontListImpl : public base::RefCounted<FontListImpl> { |
| // Returns a new FontListImpl with the same font names but resized and the |
|
msw
2016/03/22 01:53:43
ditto nit: "and with the given style and weight."
|
| // given style. |size_delta| is the size in pixels to add to the current font |
| // size. |font_style| specifies the new style, which is a bitmask of the |
| - // values: Font::BOLD, Font::ITALIC and Font::UNDERLINE. |
| - FontListImpl* Derive(int size_delta, int font_style) const; |
| + // values: Font::ITALIC and Font::UNDERLINE. |
| + FontListImpl* Derive(int size_delta, |
| + int font_style, |
| + gfx::Font::FontWeight weight) const; |
| // Returns the height of this font list, which is max(ascent) + max(descent) |
| // for all the fonts in the font list. |
| @@ -73,6 +77,9 @@ class FontListImpl : public base::RefCounted<FontListImpl> { |
| // Returns the font size in pixels. |
| int GetFontSize() const; |
| + // Returns the font weight. |
| + gfx::Font::FontWeight GetFontWeight() const; |
| + |
| // Returns the Font vector. |
| const std::vector<Font>& GetFonts() const; |
| @@ -113,6 +120,7 @@ class FontListImpl : public base::RefCounted<FontListImpl> { |
| // Cached font style and size. |
| mutable int font_style_; |
| mutable int font_size_; |
| + mutable gfx::Font::FontWeight font_weight_; |
| }; |
| } // namespace gfx |