| 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..93f17ec8abfd03698e3956c9568a055a2cffa8c7 100644
|
| --- a/ui/gfx/font_list_impl.h
|
| +++ b/ui/gfx/font_list_impl.h
|
| @@ -9,11 +9,10 @@
|
| #include <vector>
|
|
|
| #include "base/memory/ref_counted.h"
|
| +#include "ui/gfx/font.h"
|
|
|
| namespace gfx {
|
|
|
| -class Font;
|
| -
|
| // FontListImpl is designed to provide the implementation of FontList and
|
| // intended to be used only from FontList. You must not use this class
|
| // directly.
|
| @@ -32,10 +31,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,
|
| + gfx::Font::Weight font_weight);
|
|
|
| // Creates a font list from a Font vector.
|
| // All fonts in this vector should have the same style and size.
|
| @@ -45,10 +45,12 @@ class FontListImpl : public base::RefCounted<FontListImpl> {
|
| explicit FontListImpl(const Font& font);
|
|
|
| // Returns a new FontListImpl with the same font names but resized and the
|
| - // 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;
|
| + // given style and weight. |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::ITALIC and Font::UNDERLINE.
|
| + FontListImpl* Derive(int size_delta,
|
| + int font_style,
|
| + gfx::Font::Weight 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 +75,9 @@ class FontListImpl : public base::RefCounted<FontListImpl> {
|
| // Returns the font size in pixels.
|
| int GetFontSize() const;
|
|
|
| + // Returns the font weight.
|
| + gfx::Font::Weight GetFontWeight() const;
|
| +
|
| // Returns the Font vector.
|
| const std::vector<Font>& GetFonts() const;
|
|
|
| @@ -113,6 +118,7 @@ class FontListImpl : public base::RefCounted<FontListImpl> {
|
| // Cached font style and size.
|
| mutable int font_style_;
|
| mutable int font_size_;
|
| + mutable gfx::Font::Weight font_weight_;
|
| };
|
|
|
| } // namespace gfx
|
|
|