Skip to content

Commit

Permalink
Change dialog font family (#141295)
Browse files Browse the repository at this point in the history
Fixes #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">
  • Loading branch information
MitchellGoodwin authored May 7, 2024
1 parent 6967ae5 commit e67e951
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/flutter/lib/src/cupertino/dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import 'theme.dart';
// Apple Design Resources(https://developer.apple.com/design/resources/).
// However the values are not exactly the same as native, so eyeballing is needed.
const TextStyle _kCupertinoDialogTitleStyle = TextStyle(
fontFamily: 'CupertinoSystemDisplay',
fontFamily: 'CupertinoSystemText',
inherit: false,
fontSize: 17.0,
fontWeight: FontWeight.w600,
Expand Down
1 change: 1 addition & 0 deletions packages/flutter/test/cupertino/dialog_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ void main() {
final DefaultTextStyle widget = tester.widget(find.byType(DefaultTextStyle));

expect(widget.style.color!.withAlpha(255), CupertinoColors.systemGreen.color);
expect(widget.style.fontFamily, 'CupertinoSystemText');
});

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

0 comments on commit e67e951

Please sign in to comment.