Skip to content

Commit

Permalink
Docs update: PixelRatio.getFontScale (#39709)
Browse files Browse the repository at this point in the history
Summary:
Addresses this issue: #39708

The embedded docs for `PixelRatio.getFontScale` haven't been updated in a while and it is still claiming lack of support for iOS when this is not the reality anymore. This was confusing for me when looking for docs through my local workspace.

## Changelog:

[INTERNAL] [CHANGED] - Updated PixelRatio.getFontScale docs to match the latest website

Pull Request resolved: #39709

Test Plan: N/A

Reviewed By: rshest

Differential Revision: D49752103

Pulled By: NickGerleman

fbshipit-source-id: 1b220bc0210639d7863b6961f665aab2cba52889
  • Loading branch information
ahmedsakr authored and facebook-github-bot committed Oct 2, 2023
1 parent 614afb5 commit a59b947
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/react-native/Libraries/Utilities/PixelRatio.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export interface PixelRatioStatic {
used to calculate the absolute font size, so any elements that
heavily depend on that should use this to do calculations.
If a font scale is not set, this returns the device pixel ratio.
* on Android value reflects the user preference set in Settings > Display > Font size
* on iOS value reflects the user preference set in Settings > Display & Brightness > Text Size,
value can also be updated in Settings > Accessibility > Display & Text Size > Larger Text
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.
If a font scale is not set, this returns the device pixel ratio.
*/
getFontScale(): number;

Expand Down

0 comments on commit a59b947

Please sign in to comment.