OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_ARC_INTENT_HELPER_FONT_SIZE_UTIL_H_ |
| 6 #define COMPONENTS_ARC_INTENT_HELPER_FONT_SIZE_UTIL_H_ |
| 7 |
| 8 namespace arc { |
| 9 |
| 10 // The following values were obtained from chrome://settings and Android's |
| 11 // Display settings on Nov 2015. They are expected to remain stable. |
| 12 const float kAndroidFontScaleSmall = 0.85; |
| 13 const float kAndroidFontScaleNormal = 1; |
| 14 const float kAndroidFontScaleLarge = 1.15; |
| 15 const float kAndroidFontScaleHuge = 1.3; |
| 16 const int kChromeFontSizeNormal = 16; |
| 17 const int kChromeFontSizeLarge = 20; |
| 18 const int kChromeFontSizeVeryLarge = 24; |
| 19 |
| 20 // Android has only a single float value for system-wide font size |
| 21 // (font_scale). Chrome has three main int pixel values that affect |
| 22 // system-wide font size. We will take the largest font value of the three |
| 23 // main font values on Chrome and convert to an Android size. |
| 24 double ConvertFontSizeChromeToAndroid(int default_size, |
| 25 int default_fixed_size, |
| 26 int minimum_size); |
| 27 |
| 28 } // namespace arc |
| 29 |
| 30 #endif // COMPONENTS_ARC_INTENT_HELPER_FONT_SIZE_UTIL_H_ |
OLD | NEW |