Chromium Code Reviews| Index: chrome/browser/ui/views/harmony/chrome_typography.cc |
| diff --git a/chrome/browser/ui/views/harmony/chrome_typography.cc b/chrome/browser/ui/views/harmony/chrome_typography.cc |
| index ddeb5633bdc94e94bf998639715c87dd7556a9c1..70ed1ac5c5441b9e05218c7c2ada8874ab81cc07 100644 |
| --- a/chrome/browser/ui/views/harmony/chrome_typography.cc |
| +++ b/chrome/browser/ui/views/harmony/chrome_typography.cc |
| @@ -6,6 +6,17 @@ |
| #include "ui/base/default_style.h" |
| #include "ui/base/resource/resource_bundle.h" |
| +#include "ui/gfx/platform_font.h" |
| + |
| +void ApplyCommonFontStyles(int context, |
| + int style, |
| + int* size_delta, |
| + gfx::Font::Weight* weight) { |
| + if (context == CONTEXT_WINDOWS10_NATIVE) { |
|
grt (UTC plus 2)
2017/08/17 11:26:32
do non-win platforms need this code? should there
skare_
2017/08/18 11:37:33
I don't think they need this. ifdef'ed out
|
| + *size_delta = 15 - gfx::PlatformFont::kDefaultBaseFontSize; |
|
grt (UTC plus 2)
2017/08/17 11:26:32
could you drop a comment explaining 15?
skare_
2017/08/18 11:37:33
Done.
|
| + *weight = views::TypographyProvider::MediumWeightForUI(); |
| + } |
| +} |
| const gfx::FontList& LegacyTypographyProvider::GetFont(int context, |
| int style) const { |
| @@ -20,6 +31,8 @@ const gfx::FontList& LegacyTypographyProvider::GetFont(int context, |
| ash::ApplyAshFontStyles(context, style, &size_delta, &font_weight); |
| #endif |
| + ApplyCommonFontStyles(context, style, &size_delta, &font_weight); |
| + |
| switch (context) { |
| case CONTEXT_HEADLINE: |
| size_delta = kHeadlineDelta; |