-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Current behaviour
I am trying to disable the fontScaling (this is required in my app) all the cases are working except react-native-paper.
This is the code I have added in index.js (root file)
`Text.defaultProps = Text.defaultProps || {};
Text.defaultProps.allowFontScaling = false;
Text.defaultProps = {maxFontSizeMultiplier: 1};
TextInput.defaultProps = {};
TextInput.defaultProps.allowFontScaling = false;`
for all the Text and TextInput component it works except react-native-paper component.
any solution on this?
Expected behaviour
It should disable font scaling
How to reproduce?
on iOS change the display to "Larger text"
What have you tried so far?
This is the code I have added in index.js (root file)
`Text.defaultProps = Text.defaultProps || {};
Text.defaultProps.allowFontScaling = false;
Text.defaultProps = {maxFontSizeMultiplier: 1};
TextInput.defaultProps = {};
TextInput.defaultProps.allowFontScaling = false;`
Your Environment
| software | version |
|---|---|
| ios | x |
| android | x |
| react-native | 0.72.3 |
| react-native-paper | 4.11.2 |
| node | 18.12.0 |
| npm or yarn | yarn/npm |
| expo sdk | x.x.x |