| Index: ui/views/style/typography_provider.h
|
| diff --git a/ui/views/style/typography_provider.h b/ui/views/style/typography_provider.h
|
| index aab1c0e997d7a325fd33671e07f3756dcea28cfd..684f751f9c43ba5225a5153d7fc0c8da6e9f5bbf 100644
|
| --- a/ui/views/style/typography_provider.h
|
| +++ b/ui/views/style/typography_provider.h
|
| @@ -31,6 +31,11 @@ class VIEWS_EXPORT TypographyProvider {
|
| // Gets the line spacing, or 0 if it should be provided by gfx::FontList.
|
| virtual int GetLineHeight(int context, int style) const = 0;
|
|
|
| + // A user's gfx::Weight::NORMAL font may already "bold enough" and requesting
|
| + // a MEDIUM font can result in a font that is less bold. So this method
|
| + // returns NORMAL, if the NORMAL font is at least as bold as |weight|.
|
| + static gfx::Font::Weight WeightNotLighterThanNormal(gfx::Font::Weight weight);
|
| +
|
| protected:
|
| TypographyProvider() = default;
|
|
|
| @@ -52,10 +57,10 @@ class VIEWS_EXPORT DefaultTypographyProvider : public TypographyProvider {
|
| // Sets the |size_delta| and |font_weight| that the the default GetFont()
|
| // implementation uses. Always sets values, even for styles it doesn't know
|
| // about.
|
| - void GetDefaultFont(int context,
|
| - int style,
|
| - int* size_delta,
|
| - gfx::Font::Weight* font_weight) const;
|
| + static void GetDefaultFont(int context,
|
| + int style,
|
| + int* size_delta,
|
| + gfx::Font::Weight* font_weight);
|
|
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(DefaultTypographyProvider);
|
|
|