slint icon indicating copy to clipboard operation
slint copied to clipboard

Missing emoji support

Open npwoods opened this issue 5 months ago • 3 comments

Bug Description

Slint text rendering seems to not recognize emoji text; they seem to be treated as normal black-and-white characters

Image

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

npwoods avatar Jun 08 '25 18:06 npwoods

Maybe related https://github.com/slint-ui/slint/issues/5171 ?

ogoffart avatar Jun 10 '25 07:06 ogoffart

Random thoughts:

  1. 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.
  2. 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 RenderableGlyph has an alpha_map property 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)

npwoods avatar Jun 10 '25 15:06 npwoods

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:

Image

tronical avatar Jun 17 '25 08:06 tronical

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.

tronical avatar Jul 09 '25 15:07 tronical