Emojis in Flatpak releases

Hey all. I’ve been making small contributions to an application (Halloy) that’s built on Iced and have encountered an issue with Flatpak + emojis.

When building and running the application directly, I am seeing emojis just fine, on whatever OS I try (I’ve tried macOS and Linux). However, with the flatpak version, I’m seeing a mismatch of emojis. (There was also another user describing oddness with the Windows builds, but can’t confirm myself).


(Top is source built, bottom is flatpak)

I spent some time trying to configure my flatpak permissions (and the app’s flatpak manifest) to see if there’s something relating to fonts. But I did not get anywhere with that respect (could be I am just a newb here).

I decided to check other (non-Iced) flatpak applications to see if they’ve this issue. I have Joplin installed via flatpak, and I tried that, and noticed the emojis look fine in Joplin.

That got me thinking, what if it’s related to Iced? Does another Flatpak application that is built on Iced exist?

That’s when I found Furtherance (neat little app btw!), testing it out… same issues as Halloy! The source built version displays emojis correctly, and the flatpak version does not.

(Can only embed one image in my post! Will upload screenshot in comment.)

This gives me a suspicion it could be an Iced + Flatpak specific issue. But I’m still pretty newb with Iced. Are there any Iced built apps that people know about that has a Flatpak version that displays emojis correctly? or maybe I’m just totally on the wrong track here :sweat_smile:

1 Like

Screenshot of Furtherance display of emojis:

(Top is source built, bottom is flatpak)

Screenshot of Joplin running in Flatpak displaying emojis:

I see something similar in my system, no flatpak. My understanding is that all those emojis are displayed correctly, they are just being rendered by different fonts. The selected font is not able to display all emojis, so the other ones are rendered using a fallback font. Try setting a specific font in Iced and see if that fixes it.

1 Like

Ah… different fall back fonts. That makes sense why I’m seeing what I’m seeing then. Next is to figure out how to determine which fonts are being displayed in each scenario.

Try setting a specific font in Iced and see if that fixes it.

Is there a list of the fonts within Iced somewhere? Not sure where to find it in the documentation :pray:

EDIT: I see, you mean setting a default font? Application in iced::application - Rust

Exactly, either the default font for the app or at the widget level.

1 Like

Oh fascinating. In flatpak, the fallback is Noto Emoji but source built, it’s Noto Color Emoji. If there’s a way to set the fallback fonts (or maybe I just need to load the color one?), maybe there can be more consistency. I do wonder why there’s a difference in which font is chosen depending on Flatpak vs not. Maybe it’s not Iced related. It does seem to only happen with Iced specific apps.

Exactly, either the default font for the app or at the widget level.

I’ve set the font to Noto Color Emoji and the font loads and displays correctly in both scenarios. Which tells me the font is available to Iced. It just seems that the fallback font chosen is different with flatpak + iced apps.

You are probably hitting this issue:

1 Like

Ah that looks exactly like what I’m seeing! Thank you @hecrj :heart: .

It looks like it’s related to a change in cosmic-text and font fallbacks within that library. On the application side, is there a path forward for this at the moment? Or do we just need to wait for an appropriate emoji fallback solution like you mentioned in this PR?