Android的文本样式缺少的轻,中,细, [英] Android text style missing light, medium, thin,
本文介绍了Android的文本样式缺少的轻,中,细,的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在设置自定义字体一个TextView,我只能选择正常,粗体或斜体:
如何设置样式为光,而不是大胆的在下面的例子吗?
< TextViewWithCustomFont
...
机器人:TEXTSTYLE =黑体/>
解决方案
这是特定的字体。不是所有的字体都有一个光 中 薄属性/样式,但默认字体应该。无衬线光或薄, fontFamily中:无衬线薄$ c您可以使用
fontFamily中使用默认光字体$ C>。
有关自定义字体,则需要包括轻型版本的字体并使用它。
When setting custom fonts for a textview, I can only choose normal, bold or italic:
How can I set the style to be light instead of bold in the following example?
<TextViewWithCustomFont
...
android:textStyle="bold"/>
解决方案
This is font specific. Not all fonts have a light, medium, thin attribute/style, but the default font should. You can use the default light font by using fontFamily: sans-serif-light
or for thin, fontFamily: sans-serif-thin
.
For custom fonts, you would need to include the light version of the font and use it.
这篇关于Android的文本样式缺少的轻,中,细,的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文