-
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
adjustsFontSizeToFit can't handle explicit line breaks #23237
Comments
Looks like there's an order with with calculations are done in as the container itself can include extra spacing when not needed |
Could be related to: #19117 |
👋 there - I can confirm that on RN 0.59 this issue is still present. We are going to look into it more over the next few months, but please feel free to work more on it if you have time / feel that you may have a good idea of a fix 🤗 |
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. |
actually it's still a thing |
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. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
Description
I recently experienced an issue with the
<Text />
component, in particular with the automatic font size shrinking on iOS. When rendering Text with explicit line break andadjustsFontSizeToFit
enabled it does not render any characters after the newline. I would expect that it takes the longest line into account and then shrinks the font size of the whole text so that the longest line fits in the container.It renders correctly without the explicit line break. I think the view has an incorrect height and therefore only renders the first line. The second line will be visible when setting an explicit height.
If you guys have any workaround in mind or some advice where to get started fixing this, I would love to hear some feedback.
Example:
Reproducible Demo
I created a demo to reproduce the issue. Clone it, install npm dependencies and run on your iOS device/simulator.
https://github.com/michaelknoch/AdjustFontSizeToFitIos-Reproduction
Environment
The text was updated successfully, but these errors were encountered: