Hello, is there an alternative to `Font` for loadi...
# compose-desktop
g
Hello, is there an alternative to
Font
for loading font from resources? It's a composable function and I can't invoke it in Type.kt file.
Copy code
val Typography = Typography(
    titleLarge = TextStyle(
        fontFamily = FontFamily(Font(Res.font.russo_one)),
        fontWeight = FontWeight.Normal,
        fontSize = 22.sp,
        lineHeight = 28.sp,
        letterSpacing = 0.sp
    )
)
This is the error message:
@Composable invocations can only happen from the context of a @Composable function
. My font files are placed in
main/composeResources/font/russo_one.ttf
.
👀 1