1

I have two views: a React Native view and an iOS native view. They both contain labels. Labels has font size 14. But on iPhone 6 font sizes are different: the iOS native view has bigger letters than a React Native view. I need to make the fonts the same. Could you help me, please?

2 Answers 2

2

Fixed. The reason of the issue was the following: a text size was changed on the iPhone in Settings -> Display & Brightness -> Text Size. React Native supports Dynamic Type, but the application hardcoded the text size in the native code. To fix the issue it is needed to support Dynamic Type on the native app side. See details about how to support it here: How to use a custom font with dynamic text sizes in iOS7

Sign up to request clarification or add additional context in comments.

Comments

0

I had the same problem.

try this:

<Text allowFontScaling={false}>
      Hi! I will not change. I don't respect settings.
</Text>

I found it here: https://joshbuchea.com/react-native-text-size-font-scaling.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.