Open LunaticHero-Cyber opened 1 week ago
I want to note that I also find this issue when working on a project with 0.74.3
@LunaticHero-Cyber Can you check this on New Architecture as well?
@LunaticHero-Cyber Can you check this on New Architecture as well?
After checking, with newArch enabled, the issue seems to persist. @shubhamguptadream11
That's interesting. The text is measured differently in TextLayoutManager.measureText
than what's actually being displayed. There is probably something wrong with how the StaticLayout
is built. I am having a closer look on that.
Description
I found the issue when using text align justify and found out that the text has an extra one number of lines. After further investigating, while using a custom asset I found out that the number of lines stays the same when it first initialize from when it had Left text align.
Here is when it is has Justify and Left text align respectively:
It is worth noting that both width in the picture is the same. Furthermore, I also checked for the number of lines from onTextLayout, and the results shows that it remains having 6 lines instead of 5 (in my case previously shown).
Steps to reproduce
React Native Version
0.75.4
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/LunaticHero-Cyber/text_test
Screenshots and Videos
No response