You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add space tracking metrics to LibTxt to properly include end-of-line spaces in bounding rects. #26658
Currently, we truncate white space at the end of lines when the text is centered.
Correct behavior should be that the white space still adds metrics but does not contribute to the centering or width of the text. This way, when spaces are typed, they still appear and the centering is not skewed.
The main goal of this is to achieve the same behavior that is present in android and iOS. It is straightforward to expose properties to toggle this, although I don't expect many people to ever use it.
Either way, what we currently do (truncate completely) is wrong.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
GaryQian commentedon Feb 12, 2019
flutter-team-archive/engine#7791 fixes this.
Hixie commentedon Feb 12, 2019
There's an argument to be made that we shouldn't even trim the spaces in rendering, but I'm not sure if it's a valid argument or not.
GaryQian commentedon Feb 12, 2019
The main goal of this is to achieve the same behavior that is present in android and iOS. It is straightforward to expose properties to toggle this, although I don't expect many people to ever use it.
Either way, what we currently do (truncate completely) is wrong.
GaryQian commentedon Feb 12, 2019
The changes in the engine to fix this should be rolled by #27808
GaryQian commentedon Feb 15, 2019
The fix has landed in the engine, but is on hold before it is rolled into flutter/flutter.
GaryQian commentedon Feb 15, 2019
The roll has landed!
github-actions commentedon Aug 14, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.