callstack / react-native-paper

Material Design for React Native (Android & iOS)
https://reactnativepaper.com
MIT License
12.91k stars 2.09k forks source link

How to Disable fontScale for Card Title, subTitle & also for react-native-paper components #4536

Open kirandchavan opened 4 days ago

kirandchavan commented 4 days ago

Ask your Question

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?

kirandchavan commented 3 days ago

Does anyone have a solution or workaround for this problem?