How can i load a custom font?
# compose-web
l
How can i load a custom font?
l
i'm actually trying to load it with androidx.compose.ui.text.font.Font for a expected/actual declaration
Sorry, my question wasnt clear enough
b
I don;t think CfW has
androidx.compose.ui.text.font.Font
so you'll just need to load the font via regular DOM APIs
l
I think it does, unless its some IDE bug
But it requires a resId: Int to load, just like android
b
So it does! I stand corrected.
l
I dont get it
b
I meant that CfW does indeed has Font type from Jetpack Compose. No clue how to integrate that with web fonts, though...
l
Oh. I read it as "I stand correct", not "corrected" My bad But yeah, i'm not sure this font implementation is working rn
b
Might just be something that only canvas-based components will use
Don;t see how it's relevant for dom CfW API