From f21f922c83630490d5903213c99c8e4d63362c8b Mon Sep 17 00:00:00 2001 From: Bartosz Kaszubowski Date: Mon, 30 Mar 2020 16:33:52 -0700 Subject: [PATCH] Update PixelRatio 'getFontScale' method description (#28407) Summary: Refs facebook/react-native-website#1776. Despite in-code description `PixelRatio.getFontScale()` is working properly on the iOS (it also reflects the user settings). This PR updates the in-code description to match current behaviour. I have decided to skip in the code information about additional setting in `Accessibility` menu and in `Control Centre`, but if you think it is important just let me know, I can update this PR. ## Changelog [Internal] [Fixed] - Fix PixelRatio getFontScale method description Pull Request resolved: https://github.com/facebook/react-native/pull/28407 Test Plan: N/A Differential Revision: D20750260 Pulled By: shergin fbshipit-source-id: c40ec2fd49cd60e2975351c3a1c453aab0045da4 --- Libraries/Utilities/PixelRatio.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/Utilities/PixelRatio.js b/Libraries/Utilities/PixelRatio.js index 99521348a5..06813b3a6d 100644 --- a/Libraries/Utilities/PixelRatio.js +++ b/Libraries/Utilities/PixelRatio.js @@ -92,9 +92,9 @@ class PixelRatio { * * If a font scale is not set, this returns the device pixel ratio. * - * Currently this is only implemented on Android and reflects the user preference set in - * Settings > Display > Font size, on iOS it will always return the default pixel ratio. - * @platform android + * This reflects the user preference set in: + * - Settings > Display > Font size on Android, + * - Settings > Display & Brightness > Text Size on iOS. */ static getFontScale(): number { return Dimensions.get('window').fontScale || PixelRatio.get();