在使用Jetpack Compose的Text()时,我无法将fontWeight更改为超过FontWeight.W600和FontWeight.W500。除了这两个之外,其他都不适用,例如FontWeight.W700、FontWeight.Bold、FontWeight(550)等。我试图创建太暗的文本,但根本无法实现。注意:我正在使用来自谷歌可下载字体的Roboto字体和material theme 3。
一个文本代码示例:
一个文本代码示例:
Text(
modifier = Modifier.padding(top = 4.dp),
text = "This should be too bold",
style = MaterialTheme.typography.titleSmall,
fontWeight = FontWeight.Black,
)
fontWeight = FontWeight.Bold
和较大的fontSize呢? - Hamid Reza