TextLayoutHelper
TextLayoutHelper
Overview
TextLayoutHelper 是一个类在Java的FOSS中.
使用PDF标准字体计量提供文本测量和文字包装.
这个类提供了3种方法,用于在Java程序中使用TextLayoutHelper 对象. 有的方法包括: getLineHeight, measureTextWidth, wrapText. 所有公众成员在安装了Java的FOSS包后,可以访问任何 Java应用程序.
Methods
| Signature | Description |
|---|---|
measureTextWidth(text: String, fontName: String, fontSize: double) → double | 测量给定文字串的宽度以用户空间单位. |
wrapText(text: String, fontName: String, fontSize: double, maxWidth: double) → List<String> | 将文本包装成符合指定最大宽度的行. |
getLineHeight(fontName: String, fontSize: double) → double | 返回给定的字体和大小的行高度. |