If i want to add a custom font say `montserrat_bol...
# compose-android
h
If i want to add a custom font say
montserrat_bold.ttf
,can i just add only
montserrat_ regular.ttf
and use
fontWeight.Bold
to implement the former bold one? Does
montserrat_bold.ttf
behave differently(looks different) with respect to [
montserrat_ regular.ttf
plus
fontWeight.Bold.
]
á
You can use a FontFamily, to define different fonts for each type (Regular, Medium, Bold etc.) like this: https://developer.android.com/jetpack/compose/text/fonts So it's recommended to use different ttf for each style.
👍 1
a
If you don't provide the bold font, the system will use something called pseudo bold or fake bold, which is synthesized and has lower quality compared to the real bold font. More details here.
👍 1
today i learned 2
h
Thanks