Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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

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

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading