Custom Font weight in jetpack compose

my designer give me

Font(R.font.source_sans_variable_350)

which is 350. I am working on fonts through this doc. To provide FontWeight in FontFamily. I checked FontWeight.Light and FontWeight.Normal which is 300 and 400 respectively. So is there any solution for 350 ?

Thanks

>Solution :

Its a class with parameterized constructor . You can just use it like this .

Font(resId = R.font.montserrat_light, weight = FontWeight(350))

Leave a Reply