Skip to content

Commit af9825f

Browse files
committed
msglist: On Android, show reaction chips with Noto Color Emoji font
We should also use this font for Unicode emojis elsewhere, such as message content, users' names, and so on. But the proper layout of these chips is especially sensitive to how these emojis get rendered, and apparently the system emoji font can vary quite a bit on Android (same link as removed in the TODO): zulip#410 (comment) So we'd like to converge on one font here (at least for Android) as soon as possible.
1 parent 2447ec3 commit af9825f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lib/widgets/emoji_reaction.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,6 @@ const _squareEmojiSize = 17.0;
198198
///
199199
/// Determined experimentally:
200200
/// <https://github.com/zulip/zulip-flutter/pull/410#discussion_r1402808701>
201-
// TODO Actually use Noto Color Emoji. Some Android
202-
// phones use Noto Color Emoji automatically, and some don't; e.g., Samsung
203-
// has its own emoji font:
204-
// <https://github.com/zulip/zulip-flutter/pull/410#discussion_r1408403111>
205201
const _notoColorEmojiTextSize = 14.5;
206202

207203
/// A [TextScaler] that limits Unicode and image emojis' max scale factor,
@@ -249,7 +245,10 @@ class _UnicodeEmoji extends StatelessWidget {
249245
case TargetPlatform.windows:
250246
return Text(
251247
textScaler: _squareEmojiScalerClamped(context),
252-
style: const TextStyle(fontSize: _notoColorEmojiTextSize),
248+
style: const TextStyle(
249+
fontFamily: 'Noto Color Emoji',
250+
fontSize: _notoColorEmojiTextSize,
251+
),
253252
strutStyle: const StrutStyle(fontSize: _notoColorEmojiTextSize, forceStrutHeight: true),
254253
parsed);
255254
case TargetPlatform.iOS:

0 commit comments

Comments
 (0)