slint
slint copied to clipboard
Missing emoji support
Bug Description
Slint text rendering seems to not recognize emoji text; they seem to be treated as normal black-and-white characters
Reproducible Code (if applicable)
export component Demo {
Text {
text: "⬆️😀😈";
font-size: 24px;
}
}
Environment Details
- Slint Version: SlintPad.com
- Platform/OS: SlintPad.com
- Programming Language: N/A
- Backend/Renderer: Web
Product Impact
No response
Maybe related https://github.com/slint-ui/slint/issues/5171 ?
Random thoughts:
- It seems unlikely that there would be a font that supports glyphs in the Emoticons code block in black and white without the color versions.
- Is there a possibility that Slint text rendering simply lacks support for color/SVG glyphs? Not completely understanding everything going on in Slint, I see that
RenderableGlyphhas analpha_mapproperty but nothing for color, and I failed to find anything doing a quick search for "SVG glyph" in the Slint code base (yes, I know there are other schemes for emoji fonts other than SVG)
It seems unlikely that there would be a font that supports glyphs in the Emoticons code block in black and white without the color versions.
That is the case here. The font you're seeing in use is the DejaVu font, which encodes black and white emojis. Here's a screenshot of font forge showing the beginning of the 1F600 block:
I've marked this as a wasp-specific bug. It's less about the rendering side than about our font support and default font choices. #2563 is also related here, or affected by the same cause.