Hi folks, there is anyway to load a Compose FontFa...
# compose
s
Hi folks, there is anyway to load a Compose FontFamily from a set of files in the device that was downloaded ?
a
Hi, you can try the following code:
Copy code
val appFontFamily = fontFamily(
    fonts = listOf(
        ResourceFont(
            resId = R.font.roboto_black, 
            weight = FontWeight.W900, 
            style = FontStyle.Normal
        ),
        ResourceFont(
            resId = R.font.roboto_black_italic, 
            weight = FontWeight.W900, 
            style = FontStyle.Italic
        ),
        ResourceFont(
            resId = R.font.roboto_bold, 
            weight = FontWeight.W700, 
            style = FontStyle.Normal
        ),
        ...
    )
)
s
The problem is that is not a resource, I'm dynamically downloading a font family to the cacheDir of the app