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..197724fed6f21c156ad8aaff7f5043213ead9137 100644 |
--- a/chrome/browser/ui/views/harmony/chrome_typography.cc |
+++ b/chrome/browser/ui/views/harmony/chrome_typography.cc |
@@ -20,6 +20,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; |
@@ -46,6 +48,19 @@ const gfx::FontList& LegacyTypographyProvider::GetFont(int context, |
size_delta, kFontStyle, font_weight); |
} |
+// Sets the |size_delta| and |font_weight| for text that should not be affected |
tapted
2017/07/07 03:32:19
nit: duplicate comment not required
skare_
2017/07/21 03:11:35
Done.
|
+// by the Harmony spec. |
+void ApplyCommonFontStyles(int context, |
tapted
2017/07/07 03:32:19
nit: move to top of the file so it matches the dec
skare_
2017/07/21 03:11:35
Done.
|
+ int style, |
+ int* size_delta, |
+ gfx::Font::Weight* weight) { |
+ if (context == CONTEXT_WINDOWS10_NATIVE) { |
+ *size_delta = 15 - gfx::PlatformFont::kDefaultBaseFontSize; |
+ *weight = views::TypographyProvider::WeightNotLighterThanNormal( |
+ gfx::Font::Weight::MEDIUM); |
+ } |
+} |
+ |
SkColor LegacyTypographyProvider::GetColor(int context, |
int style, |
const ui::NativeTheme& theme) const { |