-
Notifications
You must be signed in to change notification settings - Fork 24.7k
Lines getting cut-off on Android devices with small font sizes #50916
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
Comments
Warning Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:
You can read more about about it on our website: How to report a bug. |
Linked it in original, but in case it helps the bot this is pull request: #50915 |
@LA-Johan Thanks for opening the issue! While reviewing the output of npx @react-native-community/cli info, we couldn’t determine if the new architecture is enabled, could you let us know whether the problem occurs on both the old architecture and the new architecture? This will help us narrow things down. |
@devanshsaini11 this is only on new architecture! |
If anyone has found a workaround that would be great too. This breaks some of our core flows for users with different font sizes making some text completely unreadable. |
@devanshsaini11 do you know which classes I might investigate on the Android side to potentially fix this? If I find the time I'd be willing to try and fix this but would appreciate some pointers. |
According to my understanding looking into TextLayoutManager or CustomLineHeightSpan might help you. |
Haven't had time to try and fix yet but can report issue persists on 0.79.2. Would appreciate any help from the team, accessibility is broken for some of our users who use larger font sizes. |
@devanshsaini11 I spent some time debugging this and I've narrowed it down to this code here When we have a small font size, the width will be smaller than the boring.width on a second measure, causing a
I've tried to find the source of the width but I'm getting lost in the bridging code between js and android, any pointers on where to look next?
Also, I haven't had any luck attaching a debugger to the Android code, any guides I find seem to be for generic react-native project, is there something different I need to do to debug here? |
Description
When device font size is set to small words in certain configuration of parent views get cut-off (see reproducer). Our users just started reporting in the last month it so I believe it was introduced in 0.79.
Steps to reproduce
UI bug, see attached screenshots.
React Native Version
0.79.1
Affected Platforms
Runtime - Android, Build - MacOS
Output of
npx @react-native-community/cli info
Stacktrace or Logs
MANDATORY Reproducer
#50915
Screenshots and Videos
Emulator is Pixel_9_API_35
With the issue:
Without the issue:
The text was updated successfully, but these errors were encountered: