Repository navigation
Line height is distributed unevenly when lineHeight <= fontSize #29507
Description
Activity
- changed the title
[-]Text clips glyphs at smaller line heights[/-][+]Line height is distributed unevenly when lineHeight <= fontSize[/+]on Jul 27, 2020 A workaround for readers who stumble on this issue: if you'd like to use smaller line heights without glyph clipping, you'll need to add top padding to the
Textelement, which you must then compensate for by shifting the element up (e.g. viatopplus relative positioning, or a negativemarginTop).Reacted by Ludvig Eriksson and Stefano MagniReacted by BenReacted by J. Demarque and Javier AlvarezDoes adding this prop help
textAlignVertical='center'?@ravirajn22: Nope, that doesn't change the output, neither on Android nor on iOS.
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 a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.
- addedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Dec 26, 2020 Nope, the issue has not been fixed; it still requires attention. I don't seem to have permission to add it to the backlog.
Reacted by Dinkelborg- removedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Dec 28, 2020 I can confirm that this is still an issue
Thanks for the tip with the workaround @andymatuschak
Reacted by nclsaudet-immersion, Thipok Cholsaipant, Chloe Danisevicius, Navaneeth Venugopal, Andy Matuschak, Swain, Nathan, Salma BENSALAH and Teodors ZeltinsYep, still an issue
Still an issue
Agreed, still an issue, bot.
Reacted by Sanket PatelOn Windows, XAML has LineStackingStrategy and TextLineBounds for fine-tuning the text positioning. On web, there's a proposal for "leading-trim".
Do iOS or Android have anything similar that could be used or exposed?
Still an issue
18 remaining items
Reopening until iOS fix for tracking purposes
Reacted by Richard Willis, Tigran, Anton Savchenko, Matthew Randle and Sanket Patel@mellyeliu I have created a PR with a fix for iOS. Please take a moment to review It. Your feedback would be greatly appreciated!
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.
- addedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Apr 7, 2025 Not stale. PR #46884 is open
Reacted by Jacint Varga- removedStaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
on Apr 7, 2025 - addedNever gets stalePrevent those issues and PRs from getting stalePrevent those issues and PRs from getting stale
on Apr 7, 2025 Can you remove https://github.com/facebook/react-native/labels/Resolution%3A%20Fixed label as the fix for iOS is not merged yet?
Reacted by Nicola Corti- addedResolution: PR SubmittedA pull request with a fix has been provided.A pull request with a fix has been provided.and removedResolution: FixedA PR that fixes this issue has been merged.A PR that fixes this issue has been merged.
on Jun 18, 2025 Very surprised that such a fundamental issue for such a widely used framework is still unresolved for so long.
Am new to developing with React Native and ran into this issue from the very beginning.The solution suggested by #29507 (comment) isn't suitable for my use case as I deal with dynamic content throughout the app with many different font sizes and some are multiline.
Mainly becomes an issue when the text is aligned with icons or there are line separators between lines of text where you can notice the uneven spacing.
Only solution I found was to increase the line height to at least 1.5 times the font size, but it doesn't always work for all cases (some just still look unbalanced regardless).
Or to reduce the icon size to give the illusion that it's centered.Really wish that more attention would be paid to this issue.
Reacted by Bardiamist, SimpleCreations, ab-bee, Nader, Vincent Profeta, troZee, Fernanda Peron, cwyyue, Anon Jindawong, Daniel O’Connor and 2 morethis issue still exist
the android fix was merged but text is still cut off and the old padding hack doesnt work in new arch so bump
@fabOnReact I saw in different threads that you primarily work on Text components, do u have any ideas on how to solve text cut offs for android (except of adjusting lh)? for ios its still possible to do padding + negative margin while for android it's impossible in new arch
jic example of cut off in the screenshot (fz = lh, first text is Noto Sans JP, second text is MPlus 1c):

Description
When
lineHeightis less than thefontSize,Textshrinks the line's bounding box only by removing space from above the text, rather than distributing the space evenly above and below, as is done with extra line height. Actually, the issue manifests whenlineHeightis less thanfontSizeplus some small amount (perhaps the font bounding box height?)—e.g. <= 45px for 40px Helvetica.This leads to clipped glyphs and produces differences in text rendering between react-native-web and react-native (necolas/react-native-web#1687). After some discussion with @necolas, my inclination is that RNW's behavior is the more reasonable one, so I thought I'd open an issue here.
This issue reproduces across a variety of fonts.
Unfortunately,I worry that fixing this issue will create subtle and surprising source compatibility issues for existing clients.
React Native version:
Steps To Reproduce
Run example app here: https://snack.expo.io/W51F2OAqD
Expected Results
The extra line spacing should be removed evenly from both above and below the type.
Snack, code example, screenshot, or link to a repository:
https://snack.expo.io/W51F2OAqD