Hello! My team has a custom type scale and therefo...
# compose
c
Hello! My team has a custom type scale and therefore we're not using the material type system. Is there anything wrong with this code or is this pretty much how you set it up?
Copy code
private val Lato = FontFamily(
    Font(R.font.lato_regular, FontWeight.Normal),
    Font(R.font.lato_bold, FontWeight.Bold),
)

object MyTypeSystem {
    val head = TextStyle(
        fontFamily = Lato,
        fontSize = 18.sp,
        fontWeight = FontWeight.Normal
    )
    val body = TextStyle(
        fontFamily = Lato,
        fontSize = 12.sp,
        fontWeight = FontWeight.Bold
    )
...
}
j
We have a similar setup (pretty much mirroring the Material implementation) and haven’t had any problems.
👍 1
s
I think you are avoiding letterSpacing, I have similar setup but i use something like this where letterSpacing is coming form MaterialTheme.typography.body1
Copy code
@Composable
fun facrNormal16BodyText() =
        MaterialTheme.typography.body1.merge(
                TextStyle(
                        fontWeight = FontWeight.Normal,
                        textAlign = TextAlign.Center,
                        fontSize = 16.sp,
                        fontFamily = JOST
                )
        )
b
Yep, doing the same thing.
👍 1