Created
June 20, 2024 15:44
-
-
Save SatyaSnehith/54cf4ce68d3e4afc0febb31db3d8a1ef to your computer and use it in GitHub Desktop.
automatic creation of fonts values in compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun printFont() { | |
for (fontWeight in listOf( | |
"Thin", | |
"Light", | |
"Normal", | |
"Medium", | |
"Bold", | |
"Black" | |
)) { | |
for (fontSize in 12..24) { | |
println("val text$fontSize$fontWeight = robotoTextStyle.copy(\n" + | |
" fontSize = $fontSize.sp,\n" + | |
" fontWeight = FontWeight.$fontWeight\n" + | |
")\n") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment