Using 1.4.0-rc03, is there any way get emoji suppo...
# compose-web
m
Using 1.4.0-rc03, is there any way get emoji support via the Text composable? For example, the following renders a box instead of a 😀
Copy code
Text(
    text = "\uD83D\uDE00", // 😀
    fontFamily = FontFamily.Default, // or Monospace, Cursive, Serif, SansSerif
)
n
I think that you should use a font that supports the corresponding glyph.
m
Hmm, I've tried a number of different typefaces and continue to get the box. The same code (using the same .ttf file for set font), shows emoji on Desktop and Android but not on web.
Tried various emoji fonts, like Google's Noto, but I run into one of two situations: 1. The emoji font is the first (or only) in a given FontFamily, emojis are rendered properly every other symbol doesn't render, appears like a box 2. The emoji font isn't the first in a given FontFamily, emojis aren't rendered properly.
I'm using a vanilla, recent build of Chrome on MacOs that has no issues showing emojis in base html. The same code runs without issue via Android and Desktop builds in the same Multiplatform project. Is there an issue somewhere in the rendering pipeline? @Oleksandr Karpovich [JB] any idea what's going on here?
o
Do you instantiate the FontFamily manually? We haven't looked into Fonts issues in Compose for Web yet. If you have a chance to file the bug with a reproducer, it would be helpful. Given the experimental status of the target, issues such as this one can surface.
m
Get the same result when I create a FontFamily manually (assuming the emoji font isn't the first font in the family) or when I use a predefined one (like FontFamily.Cursive) - all emoji appears like a square. Happy to file a bug with some code to repro. What's the right way to file it for web? @Oleksandr Karpovich [JB] do you mind sharing a link or instructions to do so?
o
m