-
Notifications
You must be signed in to change notification settings - Fork 24.6k
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
Text descender characters cut-off after upgrade from 0.76.1 to 0.78 with lineHeight the same as fontSize #49886
Comments
Hey @a-klotz-p8, |
Yes, for me this issue only occurred on Android. Good to hear you where able to reproduce it. |
TLDR: Using a This is because of changes related to how we distribute line-height, to act more like web. A similar change may be coming to iOS, that @cipolleschi has been looking at getting merged. #29507 Previously, React Native on Android would arbitrarily shift text up, when Now, React Native, like web, will center text within the the line box, instead of shifting the text upward. Unfortunately, unlike web, React Native still enforces that glyphs overflowing the bounds of the Here's an example of what this looks like on web, where we mark a paragraph with ![]() |
Thanks for the explanation. I guess in the meantime I am going to use paddingVertical with negative marginVertical until react-native Text allows overflowing glyphs. |
@NickGerleman ![]() snack reproducer: Is there a better way to fix this? |
I tried this code example, but this issue didn't occur on Android device~ |
The original Issue with the text being cut off? On what device did you run it and was it in a expo snack or from the Github replication repo? |
Description
After upgrading to the latest RN (0.78) I noticed that text descenders are cut off on Android while on iOS the text looks normal.
iOS:
Android:
Steps to reproduce
alternatively just init a new latest RN project and add Text components with the same lineHeight and fontSize.
React Native Version
0.78.0
Affected Platforms
Runtime - Android
Output of
npx @react-native-community/cli info
Stacktrace or Logs
Reproducer
https://github.com/a-klotz-p8/TextDescendersIssue/tree/main
Screenshots and Videos
The text was updated successfully, but these errors were encountered: