Open safield opened 3 years ago
@safield
Is this specifically for web ? as I see below after running flutter run -d chrome
:
On mobile though, it shows up properly:
@darshankawar
I am replicating it on Android.
Tested On Android 8.0 Moto G5 Plus
I see. I missed this to read. I tried on Samsung S10 but didn't see the same behavior:
Can you try on latest master too to see if it's consistent ? Thanks.
I would recommend decresing the value from 0.53 to something lower on your samsung. Its possible the value varies by device.
As a clear reproduction cases already exists, this bug should be moved off of "waiting for customer response". We have is repoduced on web and Moto g5 plus.
My job is done here.
I would recommend decreasing the value from 0.53 to something lower on your samsung. Its possible the value varies by device.
Yes, doing that was able to see the issue.
TextPainter.heigh is == 0 after calling layout(), probably connected issue with this one.
TextPainter.heigh is == 0 after calling layout(), probably connected issue with this one.
We were using textPainter.height for our calculations and it was producing the same weird results described in this ticket. It only returns int values, even though the property is double (so 2.0, 1.0 and 0.0 for big scaling). Using textPainter.getFullHeightForCaret instead solved our issues, but we are still waiting for the textpainter fix with all the other cases. So, if textpainter is using the heigh property for it's own calculations, this is likely what is causing an issue.
Summary: When using a TextPainter to draw font that is very small (0.53 fontSize) on a highly scaled canvas (20x), the font will be positioned above the expected draw region.
Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision f4abaa0735 (8 weeks ago) • 2021-07-01 12:46:11 -0700 Engine • revision 241c87ad80 Tools • Dart 2.13.4 Tested On Android 8.0 Moto G5 Plus
Reproduction Example: