diff --git a/assets/fonts/Twemoji.ttf b/assets/fonts/Twemoji.ttf new file mode 100644 index 000000000..287ff7eaf Binary files /dev/null and b/assets/fonts/Twemoji.ttf differ diff --git a/lib/widgets/theming/primary_accent_text.dart b/lib/widgets/theming/primary_accent_text.dart index 1776fc75a..b5269719f 100644 --- a/lib/widgets/theming/primary_accent_text.dart +++ b/lib/widgets/theming/primary_accent_text.dart @@ -32,7 +32,8 @@ class OBPrimaryAccentText extends StatelessWidget { TextStyle themedTextStyle = TextStyle( foreground: Paint() ..shader = themeValueParserService - .parseGradient(theme.primaryAccentColor).createShader(Rect.fromLTWH(0.0, 0.0, 200.0, 70.0))); + .parseGradient(theme.primaryAccentColor).createShader(Rect.fromLTWH(0.0, 0.0, 200.0, 70.0)), + fontFamilyFallback: ['NunitoSans', 'Emoji']); if (finalStyle != null) { finalStyle = finalStyle.merge(themedTextStyle); diff --git a/lib/widgets/theming/secondary_text.dart b/lib/widgets/theming/secondary_text.dart index 67a2cec5f..e8be7f1b3 100644 --- a/lib/widgets/theming/secondary_text.dart +++ b/lib/widgets/theming/secondary_text.dart @@ -28,7 +28,8 @@ class OBSecondaryText extends StatelessWidget { TextStyle finalStyle = style; TextStyle themedTextStyle = TextStyle( color: - themeValueParserService.parseColor(theme.secondaryTextColor)); + themeValueParserService.parseColor(theme.secondaryTextColor), + fontFamilyFallback: ['NunitoSans', 'Emoji']); if (finalStyle != null) { finalStyle = finalStyle.merge(themedTextStyle); diff --git a/lib/widgets/theming/smart_text.dart b/lib/widgets/theming/smart_text.dart index 0f86ff878..163651c52 100644 --- a/lib/widgets/theming/smart_text.dart +++ b/lib/widgets/theming/smart_text.dart @@ -374,7 +374,7 @@ class OBSmartText extends StatelessWidget { TextStyle textStyle = TextStyle( color: primaryTextColor, fontSize: fontSize, - fontFamilyFallback: ['NunitoSans']); + fontFamilyFallback: ['NunitoSans', 'Emoji']); TextStyle secondaryTextStyle; @@ -386,7 +386,7 @@ class OBSmartText extends StatelessWidget { secondaryTextStyle = TextStyle( color: secondaryTextColor, fontSize: fontSize * 0.8, - fontFamilyFallback: ['NunitoSans']); + fontFamilyFallback: ['NunitoSans', 'Emoji']); } Color actionsForegroundColor = themeValueParserService @@ -397,6 +397,7 @@ class OBSmartText extends StatelessWidget { color: actionsForegroundColor, fontSize: fontSize, fontWeight: FontWeight.bold, + fontFamilyFallback: ['NunitoSans', 'Emoji'], ); return RichText( diff --git a/lib/widgets/theming/text.dart b/lib/widgets/theming/text.dart index 1a45f75f9..0d65af6c8 100644 --- a/lib/widgets/theming/text.dart +++ b/lib/widgets/theming/text.dart @@ -59,7 +59,7 @@ class OBText extends StatelessWidget { TextStyle themedTextStyle = TextStyle( color: themeValueParserService.parseColor(theme.primaryTextColor), - fontFamilyFallback: ['NunitoSans'], + fontFamilyFallback: ['NunitoSans', 'Emoji'], fontSize: (style != null && style.fontSize != null) ? style.fontSize : fontSize); diff --git a/pubspec.yaml b/pubspec.yaml index c8a8f952e..4d455cd28 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -166,6 +166,11 @@ flutter: style: normal - asset: assets/fonts/VisbyRoundCF-Bold.otf style: italic + # Generic name to allow changing the emoji font later on + - family: Emoji + fonts: + - asset: assets/fonts/Twemoji.ttf + style: normal - family: '' fonts: - asset: assets/fonts/NunitoSans-Regular.ttf