字体配置文件,与 CSS 中的 FontFace 属性对应。
- 自从
- 2.11.2
◆ FontFace()
com.herewhite.sdk.domain.FontFace.FontFace |
( |
String |
name, |
|
|
String |
src |
|
) |
| |
- 参数
-
name | 字体名称,需要和 CSS 中 font-family 字段的值对应。 |
src | 字体文件的地址,需要和 CSS 中 src 字段的值对应。支持的格式为 url() ,表示指向远程字体文件位置,例如,url("https://white-pan.oss-cn-shanghai.aliyuncs.com/Pacifico-Regular.ttf") 。 |
◆ getFontStyle()
String com.herewhite.sdk.domain.FontFace.getFontStyle |
( |
| ) |
|
◆ setFontStyle()
void com.herewhite.sdk.domain.FontFace.setFontStyle |
( |
String |
fontStyle | ) |
|
设置字体样式。
- 参数
-
fontStyle | 字体样式,需要和 CSS 中 font-style 字段的值对应,取值包括:
normal :(默认)常规。
italic :斜体。
|
◆ getFontWeight()
String com.herewhite.sdk.domain.FontFace.getFontWeight |
( |
| ) |
|
◆ setFontWeight()
void com.herewhite.sdk.domain.FontFace.setFontWeight |
( |
String |
fontWeight | ) |
|
设置字体粗细。
- 参数
-
fontWeight | 字体粗细,需要和 CSS 中 font-weight 字段的值对应。 |
◆ getUnicodeRange()
String com.herewhite.sdk.domain.FontFace.getUnicodeRange |
( |
| ) |
|
◆ setUnicodeRange()
void com.herewhite.sdk.domain.FontFace.setUnicodeRange |
( |
String |
unicodeRange | ) |
|
设置字体的字符编码范围。
- 参数
-
unicodeRange | 字体的字符编码范围,需要和 CSS 中 unicode-range 字段的值对应。 |