Alexander Sysoev
05/31/2022, 12:23 PMemotion-css
in kotlin files. I tried this in Global styles, but it didn’t seem to work
Upd: it works if font is .woff2 format
fun RuleBuilder<PropertiesBuilder>.applyFonts() {
fontFace {
fontFamily = "Poppins"
src = "url('fonts/Poppins/Poppins/Poppins-Regular.ttf') format('ttf')"
fontWeight = FontWeight.normal
fontStyle = FontStyle.normal
}
"*" {
fontFamily = Fonts.PoppinsRegular.fontFamily()
}
}
folder fonts
is in the resources
directory