Number getTextLineHeight(Object object)
支持版本: (core 版本 >= 1.0.2)
参数
Object object
属性
键值类型
是否必填
默认值
说明
fontStyle
string
否
normal
字体样式
fontWeight
字重
fontSize
number
16
字号
fontFamily
是
字体名称
text
文本的内容
success
function
接口调用成功的回调函数
fail
接口调用失败的回调函数
complete
接口调用结束的回调函数
返回值
Number: 给定文本的行高
支持版本: (core 版本 >= 1.2.0)
string path
path
字体文件路径
string : 如果加载字体成功,则返回字体 family 值,否则返回 null。
Last updated 6 years ago
Was this helpful?
string loadFont(string path)