I want to load monochrome font emojis and at a lat...
# compose-web
a
I want to load monochrome font emojis and at a later stage load colored ones Right now if i try to load the monochrome ones and at a later stage load the colored ones, nothing happens. I think it's because it's the exact same 'glyphs' in both. Is it possible to update the font somehow? maybe wipe the font cache? I can't find something related
o
nothing happens.
do you mean you keep seeing the monochrome emojis even after
preload()
the colored ones?
a
yes
oh hold on. let me double check
double checked ,yes
o
I think it's because it's the exact same 'glyphs' in both.
Sounds right. Perhaps you could try to replace the
LocalFontFamilyResolver.current
- you can provide a different resovler. Then call
preload
on the new FontFamily.Resolver instance. The methods to create a new FontFamily.Resolver - https://github.com/JetBrains/compose-multiplatform-core/blob/4a6156dd22743372f30bd[…]otlin/androidx/compose/ui/text/font/FontFamilyResolver.skiko.kt
a
but that way i would lose the other cached fonts too right?
that might not be a problem tho
o
yes, you can call preload for them again