Alex Styl
12/23/2024, 1:55 AMArtem Kobzar
12/23/2024, 8:36 AMOleksandr Karpovich [JB]
12/23/2024, 9:10 AMfontsLoaded.value = true
. Its purpose is to know when the fallback font is ready, so you know when to show the app content. Otherwise the UI would start rendering before the fallback font is ready.
If you have added a fallback font but still it shows tofu, it's likely that the font doesn't have a glyph for that particular emoji. In that case you'd need to use some other font. But first try showing some popular emojis.
_
P.S. The proper documentation for this is in progress.Alex Styl
12/23/2024, 1:26 PMAlex Styl
12/23/2024, 1:27 PMOleksandr Karpovich [JB]
12/23/2024, 2:18 PMfontFamilyResolver.preload(emojiFontFamily)
It works like this:
As a first step, the implicit font manager (in skia) is trying to find a glyph in the fonts provided by you in a Theme or right in a Text() composable call.
If it can't find it there, it would try to find them in a default font (Roboto Regular is bundled into skiko.wasm). And if it can't find it there, the last step is to check the fallback fonts. When you use fontFamilyResolver.preload
it would add it to the collection of fallback fonts.
If it not found there, then it would be shown as a tofu - □dewildte
01/14/2025, 1:44 PMOleksandr Karpovich [JB]
01/17/2025, 11:17 AM