-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
When the textScaleFactor in a RenderParagraph is not 1.0, or the font size is particular sizes (even without scaling) the Linux tests render, or at least measure, widths that are different than the same tests on Mac. When they are off, they appear to be exactly one pixel off, and only in width.
Mac: fontSize: 10.0, textScaleFactor: 1.3 --> 13.0 wide
Linux: fontSize: 10.0, textScaleFactor: 1.3 --> 14.0 wide
Mac: fontSize: 123.0, textScaleFactor: 1.3 --> 160.0 wide
Linux: fontSize: 123.0, textScaleFactor: 1.3 --> 161.0 wide
Mac: fontSize: 100.0, textScaleFactor: 2.0 --> 200.0 wide
Linux: fontSize: 100.0, textScaleFactor: 2.0 --> 201.0 wide
BUT:
Mac: fontSize: 200.0, textScaleFactor: 2.0 --> 400.0 wide
Linux: fontSize: 200.0, textScaleFactor: 2.0 --> 400.0 wide
So it's not ALL the time, for all scales/font sizes. This suggests some subtle difference in font rendering on one/both platforms.
Since Blink-based text rendering is being replaced, re-evaluate this bug once that has completed.
Some tests affected by this:
test/painting/text_painter_test.dart
test/widgets/text_test.dart
test/rendering/paragraph_test.dart
There is a TODO(#12357) in paragraph_test.dart that marks where the test should have the anyOf converted to a single value once this issue is fixed.