mirror of
https://github.com/status-im/react-native.git
synced 2025-01-10 01:25:39 +00:00
186f308aec
Summary: The PR description has been updated to reflect the new approach. **Breaking Change Summary** On Android, the following properties now return a different number: - `Dimensions.get('window').fontScale` - `Dimensions.get('screen').fontScale` - `PixelRatio.getFontScale()` This is a breaking change to anyone who was using these properties because the meaning of these properties has now changed. These properties used to return a value representing font scale times density ([`DisplayMetrics.scaledDensity`](https://developer.android.com/reference/android/util/DisplayMetrics.html#scaledDensity)). Now they return a value representing just font scale ([`Configuration.fontScale`](https://developer.android.com/reference/android/content/res/Configuration.html#fontScale)). **PR Description** This PR changes a few things: - Correctly exposes the font scale to JavaScript as `Dimensions.get('screen').fontScale`. UIManager was exporting `DisplayMetrics.scaledDensity` under the name `fontScale`. How Closes https://github.com/facebook/react-native/pull/11008 Differential Revision: D4558207 Pulled By: astreet fbshipit-source-id: 096ce7b28051325dfd45fdb2a14b5e9b7d3bc46f