Ido Cohen
Ido Cohen

Reputation: 800

How can I get the phone native font size in react native?

I need to get the phone native font size (set in accessibility on ios and screen settings on android). is there a way to get that parameter?

I couldn't find anything online.

I need that because whenever a user changes his phone native font size the font in the app also getting bigger(which is just fine! I want to support that) but the elements that contains it doesn't. So I need that parameter to handle the container elements.

Upvotes: 1

Views: 1150

Answers (1)

Abhi nav
Abhi nav

Reputation: 184

You can use react-native-device-info as it gives you a function getFontScale() for getting device font size in android and ios

Upvotes: 2

Related Questions