# Function: getTextLineHeight

getTextLineHeight(params: GetTextLineHeightParams): number

获取一行文本的行高

注意:经过 wx 真机实测,该 API 为同步函数,返回 number,传入的 success/fail/complete callback 均被忽略

todo 注意:这里的 wx 文档是错的 无需输入 callback 函数

# 参数:

属性 类型
params GetTextLineHeightParams

GetTextLineHeightParams

属性 类型 描述
fontFamily string 字体名称
fontSize? number 字号
fontStyle? "normal" | "italic" 字体样式
fontWeight? "normal" | "bold" 字重
text string 文本的内容

# 返回值:

number

文本的行高