Enlargement of size of the device font will sometimes break (Styling wise).
In another file, import the actual Text
component as ScaledText
so as a backup, and then redefine Text
, overriding the allowFontScaling
prop.
export function Text(props) {
return ;
}
Then, import your locally defined Text
component, instead of the built-in React Native Text
. This is also useful if you want to elegantly disable font scaling on only certain parts of your app.