Skip to content

ui: For boring, non-emoji font, use one that iOS recognizes #290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lib/widgets/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ class ZulipApp extends StatelessWidget {
// Note that specifiying only "Noto Color Emoji" in the fallback list,
// Flutter tries to use it to draw even the non emoji characters
// which leads to broken text rendering.
fontFamilyFallback: const <String>['sans-serif', 'Noto Color Emoji'],
fontFamilyFallback: [
// …since apparently iOS doesn't support 'sans-serif', use this instead:
// https://github.com/flutter/flutter/issues/63507#issuecomment-1698504425
if (Theme.of(context).platform == TargetPlatform.iOS) '.AppleSystemUIFont' else 'sans-serif',
'Noto Color Emoji',
],
useMaterial3: false, // TODO(#225) fix things and switch to true
// This applies Material 3's color system to produce a palette of
// appropriately matching and contrasting colors for use in a UI.
Expand Down