Pedro Lamarão
04/24/2025, 6:06 PMpreloadFont
method to preload a variable font with CMP 1.8.0-beta02 but it doesn`t seem to have any effect. The code samples are very simple, I am doing something like below. Am I missing something?
ComposeViewport(document.body!!) {
val robotoFlex by preloadFont(Res.font.RobotoFlex)
if (robotoFlex != null) {
App()
}
else {
Box(modifier = Modifier.fillMaxSize()) {
CircularProgressIndicator(modifier = Modifier.align(Alignment.Center))
}
}
}
The app above still flashes with unstyled text.