Skip to content

Commit 91f8b94

Browse files
app: set a global font family fallback for emojis
1 parent 4e863a7 commit 91f8b94

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/widgets/app.dart

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@ class ZulipApp extends StatelessWidget {
1212
@override
1313
Widget build(BuildContext context) {
1414
final theme = ThemeData(
15+
// This correctly sets up a the font fallback for normal text that
16+
// may contain an emoji, where it will use any font from the "sans-serif"
17+
// group to fetch the glyphs and fallback to "Noto Color Emoji" for emojis.
18+
//
19+
// Note that specifiying only "Noto Color Emoji" in the fallback list,
20+
// Flutter tries to use it to draw even the non emoji characters;
21+
// which leads to broken text rendering.
22+
fontFamilyFallback: const <String>['sans-serif', 'Noto Color Emoji'],
1523
useMaterial3: false, // TODO(#225) fix things and switch to true
1624
// This applies Material 3's color system to produce a palette of
1725
// appropriately matching and contrasting colors for use in a UI.

0 commit comments

Comments
 (0)