FontWeights

interface FontWeights

提供了一组预定义的字体粗细(FontWeight)以及用于创建和插值的方法。

Author

M8Test, [email protected], https://m8test.com

Functions

Link copied to clipboard
abstract fun create(weight: Int): FontWeight

创建一个具有指定字重值的 FontWeight 实例。

Link copied to clipboard
abstract fun getBlack(): FontWeight

黑体 (900)

Link copied to clipboard
abstract fun getBold(): FontWeight

粗体 (700)

Link copied to clipboard
abstract fun getExtraBold(): FontWeight

特粗体 (800)

Link copied to clipboard
abstract fun getExtraLight(): FontWeight

特细体 (200)

Link copied to clipboard
abstract fun getLight(): FontWeight

亮体 (300)

Link copied to clipboard
abstract fun getMedium(): FontWeight

中等体 (500)

Link copied to clipboard
abstract fun getNormal(): FontWeight

常规/普通体 (400),默认字重。

Link copied to clipboard
abstract fun getSemiBold(): FontWeight

半粗体 (600)

Link copied to clipboard
abstract fun getThin(): FontWeight

细体 (100)

Link copied to clipboard
abstract fun lerp(start: FontWeight, stop: FontWeight, fraction: Float): FontWeight

在两个字重之间进行线性插值。