Hello? I'm learning android Jetpack Compose with Google Jetpack Compose Pathway, and I have a question about FontFamily.
I saw a code using FontFamily like below.
private val Montserrat = FontFamily(
Font(R.font.montserrat_regular),
Font(R.font.montserrat_medium, FontWeight.W500),
Font(R.font.montserrat_semibold, FontWeight.W600)
)
And I did an experience. I leave a Font object and remove others like below. And I found that App does not report compile error or runtime error and Some Style attribute like 'italic` is still applied to text.
private val Montserrat = FontFamily(
Font(R.font.montserrat_regular)
)
So, I thought that Font objects in FontFamily will be used if they are more suitable to attributes specified in TextStyle.
Is my guess correct?
(Sorry for my english)