is there any way to be able to view asset fonts in...
# compose-android
a
is there any way to be able to view asset fonts in a composable preview? ie fonts created using this constructor
Copy code
@Stable
fun Font(
    path: String,
    assetManager: AssetManager,
    weight: FontWeight = FontWeight.Normal,
    style: FontStyle = FontStyle.Normal,
    variationSettings: FontVariation.Settings = FontVariation.Settings(weight, style)
): Font = AndroidAssetFont(assetManager, path, weight, style, variationSettings)
Not holding my breath but would be nice
the more i think about it the more im sure the answer is a resounding no. there is no alternative to simply move the fonts and refer to them via resource id
t
Did you tried it? I think loading assets should work in the preview. It is just when you try to do downloads from a network will not work for sure. But i do not know about Font
a
I did try it, it did not work in previews but worked while running
found the issue, fonts were being stored in a different module
👍 1