Skip to content

Commit 03515b4

Browse files
MitchellGoodwinpull[bot]
authored andcommitted
Change dialog font family (flutter#141295)
Fixes flutter#139434. Changes the font from "Text" to "Display". We should only be using the "Display" font for fonts of size 20 and above. Previously "Display" was not showing correctly so this font being wrong was flying under the radar. Before: <img width="315" alt="Screenshot 2024-01-10 at 10 49 26�AM" src="https://github.com/flutter/flutter/assets/58190796/c8beba30-04d2-4c22-86ae-85c0576136ee"> After: <img width="289" alt="Screenshot 2024-01-10 at 10 52 11�AM" src="https://github.com/flutter/flutter/assets/58190796/c6b33aaf-791c-460e-a640-37d8ddf3f713">
1 parent 8fb6139 commit 03515b4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

packages/flutter/lib/src/cupertino/dialog.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import 'theme.dart';
2323
// Apple Design Resources(https://developer.apple.com/design/resources/).
2424
// However the values are not exactly the same as native, so eyeballing is needed.
2525
const TextStyle _kCupertinoDialogTitleStyle = TextStyle(
26-
fontFamily: 'CupertinoSystemDisplay',
26+
fontFamily: 'CupertinoSystemText',
2727
inherit: false,
2828
fontSize: 17.0,
2929
fontWeight: FontWeight.w600,

packages/flutter/test/cupertino/dialog_test.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ void main() {
140140
final DefaultTextStyle widget = tester.widget(find.byType(DefaultTextStyle));
141141

142142
expect(widget.style.color!.withAlpha(255), CupertinoColors.systemGreen.color);
143+
expect(widget.style.fontFamily, 'CupertinoSystemText');
143144
});
144145

145146
testWidgets('Dialog dark theme', (WidgetTester tester) async {

0 commit comments

Comments
 (0)