Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Prev Previous commit
Next Next commit
specify font name
  • Loading branch information
LongCatIsLooong committed May 23, 2024
commit aef01f2101ec2495522af3fe3ff7adf90aab598c
5 changes: 3 additions & 2 deletions lib/web_ui/test/ui/paragraph_builder_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ Future<void> testMain() async {
test('kTextHeightNone unsets the height multiplier', () {
const double fontSize = 10;
const String text = 'A';
final ParagraphBuilder builder = ParagraphBuilder(ParagraphStyle(fontSize: fontSize, height: 10));
final ParagraphBuilder builder = ParagraphBuilder(ParagraphStyle(fontSize: fontSize, height: 10, fontFamily: 'FlutterTest'));
builder.pushStyle(TextStyle(height: kTextHeightNone));
builder.addText(text);
final Paragraph paragraph = builder.build()
Expand All @@ -96,7 +96,7 @@ Future<void> testMain() async {
test('kTextHeightNone ParagraphStyle', () {
const double fontSize = 10;
final ParagraphBuilder builder = ParagraphBuilder(
ParagraphStyle(fontSize: fontSize, height: kTextHeightNone),
ParagraphStyle(fontSize: fontSize, height: kTextHeightNone, fontFamily: 'FlutterTest'),
);
builder.addText('A');
final Paragraph paragraph = builder.build()
Expand All @@ -109,6 +109,7 @@ Future<void> testMain() async {
final ParagraphBuilder builder = ParagraphBuilder(
ParagraphStyle(
fontSize: 100,
fontFamily: 'FlutterTest',
strutStyle: StrutStyle(forceStrutHeight: true, height: kTextHeightNone, fontSize: fontSize),
),
);
Expand Down