I’ve implemented font scaling limitations in my React Native application to accommodate various device font sizes on iOS and Android. While this approach works well for most components, it doesn’t affect the font scaling of native iOS Alert and Action components. I’m exploring ways to extend font scaling control to these native elements.
Would integrating a solution using UIFontMetrics and setting it up as a native module be a feasible approach? I’d appreciate any suggestions or insights from the community on how to achieve font scaling limitations for native iOS Alert and Action components.
const customMaxFontSizeMultiplier = 1.27;
Text.defaultProps = Text.defaultProps || {};
Text.defaultProps.maxFontSizeMultiplier = customMaxFontSizeMultiplier;
TextInput.defaultProps = TextInput.defaultProps || {};
TextInput.defaultProps.maxFontSizeMultiplier = customMaxFontSizeMultiplier;