font size responsive ios android react native code example
Example 1: react native responsive font
import { Dimensions } from 'react-native';
const { width, **fontScale** } = Dimensions.get("window");
const styles = StyleSheet.create({
fontSize: idleFontSize / **fontScale**,
});
Example 2: react native scaling font
<Text
numberOfLines={1}// add this
adjustsFontSizeToFit// add this
style={{textAlign:'center',fontSize:30}}
>