Skip to content

Commit 593d88a

Browse files
rajveermalviyagnprice
authored andcommitted
app: Set global font family fallback for unicode emojis
1 parent f41d62d commit 593d88a

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
@@ -14,6 +14,14 @@ class ZulipApp extends StatelessWidget {
1414
@override
1515
Widget build(BuildContext context) {
1616
final theme = ThemeData(
17+
// This sets up the font fallback for normal text that
18+
// may contain an emoji, where it will use any font from the "sans-serif"
19+
// group to fetch the glyphs and fallback to "Noto Color Emoji" for emojis.
20+
//
21+
// Note that specifiying only "Noto Color Emoji" in the fallback list,
22+
// Flutter tries to use it to draw even the non emoji characters
23+
// which leads to broken text rendering.
24+
fontFamilyFallback: const <String>['sans-serif', 'Noto Color Emoji'],
1725
useMaterial3: false, // TODO(#225) fix things and switch to true
1826
// This applies Material 3's color system to produce a palette of
1927
// appropriately matching and contrasting colors for use in a UI.

0 commit comments

Comments
 (0)