I am trying to jazz up my project by using some emojis in some RadioButton.Caption and in a DesktopSegmentedButton. On Mac, they are displayed in color, but on Windows, they display in black and white.
However I have tried changing the font of the RadioButtons in the Opening event and it makes no difference.
Var emojifont As String = "Segoe UI Emoji"
//FontAvailable is a function in a global module that iterates through System.FontAt
If FontAvailable(emojifont) Then
Me.FontName = emojifont 'The font is available and this line runs
Is there something different I should be doing or do Xojo built apps just not display color emojis on Windows?
He did mention Desktop controls, so css may not come into play, but it could still be a timing issue. Try moving that code to the Window’s Opening event or even to a short-period timer you start from window opening. Don’t know if it will make a difference, but it’s worth a shot.
Emojis from Microsoft are supported on PCs and tablets running Windows 11, Windows 10, as well as Xbox. There were also available on Windows phones prior to them being discontinued. These are provided by the Segoe UI Emoji font, although some applications continue to show black and white emojis from an earlier release.
As of the Windows 11 November 2021 update, the platform includes the new Fluent emoji design set that was first previewed ahead of 2021’s World Emoji Day. Windows 10’s last emoji update was the May 2019 Update, which supported emoji from up to early 2019’s Emoji 12.0.
I don’t have any knowledge of how fonts work – whether it has more to do with the operating system or to the application – but I suspect that Xojo just doesn’t support color emojis on Windows yet. Oh well, it doesn’t affect my apps functionality. I’ll live…
Ah, variations in emoji are common in fonts. Some platforms do a simple mono outline and others coloured. You are also likely using System font on each platform, which could come out differently on Mac and Windows. There’s no easy way of knowing exactly which font is being used on each platform when you select System. It likely also depends upon the version of the OS in question.
Certainly on the Mac different fonts have different representations on the emoji. For example I needed a globe emoji for my help system, because of the new key on the latest Macs. I had to switch to an alternate font for it to prevent it being blue and 3 dimensional.
The problem you could face is that changing the font for each platform is easy, changing it for one segment is no so simple. I’m not even sure it is possible.
I’m seeing the same issue on Linux (Both “Ubuntu 22.04.2 LTS” and Raspberry Pi OS (“Raspbian GNU/Linux 11 (bullseye)”).
This is after doing a lot of reading and installing the Google Noto Color Emoji font again and editing fontconfig files - no luck - all emoji icons are black and white.
Both of the Linux hosts correctly show the emojis in Google Chrome and Chromium as the correct color versions which seems to indicate the color emoji font is available to apps that correctly reference it …
I narrowed it down further: Listbox (which my app requires) on RPi is the issue - it displays the same string with color emojis as black and white but a label with the same string is correctly displayed with the color versions.
dim mEmojiStr as String = "Justin Testing ♈ 🤩"
EmojiLabel.FontSize = 32
EmojiLabel.Text = mEmojiStr
EmojiListBox.AddRow( mEmojiStr )
My only thought is that this sounds like a bug with Graphics.DrawText on Linux. Since the color emojis show up just fine with Labels, TextFields, TextAreas, etc. then Graphics.DrawText (which the ListBox utilizes) should likely do the same.