-
Notifications
You must be signed in to change notification settings - Fork 30.1k
Closed
Labels
a: qualityA truly polished experienceA truly polished experiencea: typographyText rendering, possibly libtxtText rendering, possibly libtxtengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.
Description
Steps to Reproduce
Flutter Engine computes incorrect maxIntrinsicWidth when ParagraphConstraints cause the paragraph to wrap. IOW, the following test should fail, but it passes:
testWidgets('odd Ahem width', (WidgetTester tester) async {
final ui.ParagraphBuilder builder = ui.ParagraphBuilder(ui.ParagraphStyle(
fontFamily: 'Ahem',
fontStyle: FontStyle.normal,
fontWeight: FontWeight.normal,
fontSize: 10.0,
));
builder.addText('Test Ahem');
final ui.Paragraph paragraph = builder.build();
paragraph.layout(ui.ParagraphConstraints(width: 50.0));
expect(paragraph.maxIntrinsicWidth, 80.0);
paragraph.layout(ui.ParagraphConstraints(width: 1000.0));
expect(paragraph.maxIntrinsicWidth, 90.0);
});Specifically, we should be getting maxIntrinsicWidth of 90.0 for both constraints. However, the engine incorrectly returns 80.0 for constraint 50.0.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: qualityA truly polished experienceA truly polished experiencea: typographyText rendering, possibly libtxtText rendering, possibly libtxtengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.