-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A text layout differs between android and ios when using external font #21021
Comments
Still is a problem on RN 0.57.1 as well, even if you set fontFamily:"system font" AKA San Francisco. Only works as expected if fontFamily is omitted, Avenir, Helvetica, etc all have the leading if there are Japanese characters/kanji. |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
This issue has not been fixed yet |
Due to platform differences you cannot same fontFamily for custom fonts on both iOS and Android. Please see https://medium.com/react-native-training/react-native-custom-fonts-ccc9aacf9e5e |
@dulmandakh I dont think this is due to the issue you mentioned (having to use different fontFamily depending on OS). Even if you have the correct fontFamily you get this extra vertical padding at the bottom for Japanese characters, on iOS only. Can we get this re-opened? It also still repros in 0.59.9. I haven't been able to get this to repro at all in a regular non-RN app. Additionally non-Japanese characters "seem to" be ok (dont get the extra vertical padding). Another bug filled on this that got closed due to inactivity: #20732 |
Agree this should be reopened. I'm seeing this with React Native 0.61.5. A workaround was to create a base text like this:
Then use this instead of a standard This means we can't use a custom font on iOS for our Japanese users. |
Environment
Run
react-native info
in your terminal and paste its contents here.Description
When I set 'Tsukushi A Round Gothic' as the fontFamily of a Text component, the layout differs between android and ios.
screenshots
The difference occurs since 'Tsukushi A Round Gothic' has a leading(a line gap. see this)
iOS doesn’t ignore leading, but android ignores it.
This difference causes the following two problems.
It is not limited to
Tsukushi A Round Gothic
. The same problem also occurs inHiragino
which is the standard iOS font.Reproducible Demo
https://drive.google.com/open?id=1jI53RiQRUbEGtotn8BrIrj3RvyNgSpZR
The text was updated successfully, but these errors were encountered: