Emoji on android
Hi,
I'm trying to have emoji rendered by setting 'TwemojiMozilla.ttf' as a fallback font. On Windows I get the proper result. The font is loaded and used when needed. On android, I always get the crossed box placeholder. Is there any current known issue regarding emoji fonts on android?
I'm using Noesis 3.0.4
Thanks
I'm trying to have emoji rendered by setting 'TwemojiMozilla.ttf' as a fallback font. On Windows I get the proper result. The font is loaded and used when needed. On android, I always get the crossed box placeholder. Is there any current known issue regarding emoji fonts on android?
I'm using Noesis 3.0.4
Thanks
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: Emoji on android
Hi, I just downloaded 'TwemojiMozilla.ttf' from https://github.com/mozilla/twemoji-colr/releases and place it next to the following xaml:
And it correctly shows emojis on Android.
Is that what you tried?
Code: Select all
<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<TextBlock Text="Hello World 😀 👍 💻" FontFamily="./#PT Root UI, ./#Twemoji Mozilla" FontSize="30"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Grid>
Is that what you tried?
Re: Emoji on android
This is what I have, I'll try your code.
I'm not seeing any log message, on android, about Noesis loading the Twemoji font, while on windows I get this log:
so it looks as if Noesis is not even trying to load the font.
Code: Select all
<TextBlock Foreground="White" FontSize="16" FontFamily="Twemoji Mozilla" HorizontalAlignment="Center" VerticalAlignment="Bottom">😀</TextBlock>
Code: Select all
[NOESIS/I] 'Twemoji Mozilla Regular' loaded
Re: Emoji on android
Thanks, I got it to work and it seems the magic is in the #. By prefixing with # it now works both on android and windows, either inline or with GUI::SetFontFallbacks, without #, thats a no go on android. Now, time to get myself educated on that #. Thanks for the help.
Re: Emoji on android
Without the '#' it means system font. You probably have the font installed on your windows machine, more information here.
We don't emit warning for system fonts because it is common to have a big list of fallback system fonts.
We don't emit warning for system fonts because it is common to have a big list of fallback system fonts.
Who is online
Users browsing this forum: Google [Bot] and 9 guests