Chromium Code Reviews| Index: app/resource_bundle.cc |
| diff --git a/app/resource_bundle.cc b/app/resource_bundle.cc |
| index 859f9a8301206b09cd59168686776071372eb5cc..38d82775408a6d082e22dfe3d960555cb33b72ec 100644 |
| --- a/app/resource_bundle.cc |
| +++ b/app/resource_bundle.cc |
| @@ -13,6 +13,21 @@ |
| #include "gfx/font.h" |
| #include "third_party/skia/include/core/SkBitmap.h" |
| +namespace { |
| + |
| +// Font sizes relative to base font. |
| +#if defined(OS_CHROMEOS) && defined(CROS_HAND_HINTED_FONTS) |
|
Daniel Erat
2010/11/18 16:28:03
CROS_HAND_HINTED_FONTS is perhaps a bit inaccurate
Nikita (slow)
2010/11/18 19:11:05
As discussed, font size correction is needed for u
|
| +const int kSmallFontSizeDelta = -3; |
| +const int kMediumFontSizeDelta = 2; |
| +const int kLargeFontSizeDelta = 7; |
| +#else |
| +const int kSmallFontSizeDelta = -2; |
| +const int kMediumFontSizeDelta = 3; |
| +const int kLargeFontSizeDelta = 8; |
| +#endif |
| + |
| +} // namespace |
| + |
| ResourceBundle* ResourceBundle::g_shared_instance_ = NULL; |
| /* static */ |
| @@ -175,17 +190,18 @@ void ResourceBundle::LoadFontsIfNecessary() { |
| base_font_->DeriveFont(0, base_font_->GetStyle() | gfx::Font::BOLD); |
| small_font_.reset(new gfx::Font()); |
| - *small_font_ = base_font_->DeriveFont(-2); |
| + *small_font_ = base_font_->DeriveFont(kSmallFontSizeDelta); |
| medium_font_.reset(new gfx::Font()); |
| - *medium_font_ = base_font_->DeriveFont(3); |
| + *medium_font_ = base_font_->DeriveFont(kMediumFontSizeDelta); |
| medium_bold_font_.reset(new gfx::Font()); |
| *medium_bold_font_ = |
| - base_font_->DeriveFont(3, base_font_->GetStyle() | gfx::Font::BOLD); |
| + base_font_->DeriveFont(kMediumFontSizeDelta, |
| + base_font_->GetStyle() | gfx::Font::BOLD); |
| large_font_.reset(new gfx::Font()); |
| - *large_font_ = base_font_->DeriveFont(8); |
| + *large_font_ = base_font_->DeriveFont(kLargeFontSizeDelta); |
| } |
| } |