hello guys . i am working on a compose textfield a...
# compose
a
hello guys . i am working on a compose textfield and use option to use different google font for the user . i am using this method https://proandroiddev.com/downloadable-fonts-with-jetpack-compose-561c6301b919 but the problem is if the font is not pre-downloaded then its takes a while to take effect . ( user select a name of google font from dropdown that contain almost 100 font names ) is there a way to download all this font when the user first open my apps ?
j
@Ale Stamato
a
Hi there! Yes you may optionally pre-fetch fonts to make sure they’re available before first usage with suspend function preload If successful, the font is cached and ready to be used. A warning tho, fonts might take up to several seconds to load/timeout so run this async
a
thank you .i will try that out .