diff --git a/assets/fonts/emojione.ttf b/assets/fonts/emojione.ttf new file mode 100644 index 000000000..776f8509a Binary files /dev/null and b/assets/fonts/emojione.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 5681a8f9a..29671fde5 100644 --- a/lib/widgets/theming/secondary_text.dart +++ b/lib/widgets/theming/secondary_text.dart @@ -26,7 +26,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 cc9fe4972..8abf59e91 100644 --- a/lib/widgets/theming/smart_text.dart +++ b/lib/widgets/theming/smart_text.dart @@ -263,7 +263,7 @@ class OBSmartText extends StatelessWidget { themeValueParserService.parseColor(theme.primaryTextColor); TextStyle textStyle = - TextStyle(color: primaryTextColor, fontSize: fontSize, fontFamilyFallback: ['NunitoSans']); + TextStyle(color: primaryTextColor, fontSize: fontSize, fontFamilyFallback: ['NunitoSans', 'Emoji']); Color actionsForegroundColor = themeValueParserService .parseGradient(theme.primaryAccentColor) @@ -273,6 +273,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 ee7ce86ab..387101a00 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -160,6 +160,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/emojione.ttf + style: normal - family: '' fonts: - asset: assets/fonts/NunitoSans-Regular.ttf