在为文本视图设置自定义字体时,我只能选择正常、粗体或斜体。
我怎么能把字体设置成 轻 而不是下面例子中的粗体?
<TextViewWithCustomFont
...
android:textStyle="bold"/>
Letter SpacingAs an adjacent solution to change a font's looks, you could use . This will change the distance between the letters within a TextView.A positive number like 0.2 will add more of a gap, while negative like -0.1 will squish the letters together.In Android 21+ you can programmatically call fontFamily: sans-serif-light
setLetterSpacingfontFamily: sans-serif-thin
or in XML add
letterSpacing
.