-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 cut off at the bottom (in Android) #17064
Comments
You have to increase the line height accordingly in order for it to render completely. This probably takes the height for only capital letters. |
But.. what do we do when we want multiple lines of text that are closer together than the line-height it takes to render the last line? What you're suggesting results in: You're right in that it fixes the g at the end, but the rest of the text does not look how I want it to look. |
I've looked into if this is even possible in native Android, and turns out that it works just fine. I did not have the time to figure out where in the React-native logic this fails, but it seems like a bug in React-native to me. |
Hey - this should be fixed in latest release (0.52). Merged PR here: #16448 |
Indeed, this was fixed in 0.52 🎉 🙌 |
Is this a bug report?
Yes
Have you read the Contributing Guidelines?
Yes
Environment
Environment:
OS: macOS High Sierra 10.13.1
Node: 8.2.1
Yarn: 0.27.5
npm: 5.3.0
Watchman: 4.7.0
Xcode: Xcode 9.1 Build version 9B55
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.3 => 0.50.3
Steps to Reproduce
create-react-native-app
for example){fontSize: 72, lineHeight: 72}
Expected Behavior
I expected the text to not be cut off at the bottom, as it does (correctly) when leaving out
lineHeight
.Actual Behavior
As soon as we define a
lineHeight
(even if it's the same as itsfontSize
) the bottom part gets cut off:(where the first one is without
lineHeight
and the second one is with{fontSize: 72, lineHeight: 72}
)Reproducible Demo
https://snack.expo.io/BJT3KRzZM
Additional notes
paddingBottom
(which could be done with similar issues in higher areas of aText
component, usingpaddingTop
)The text was updated successfully, but these errors were encountered: