public static final class FontFamily.Builder extends Object
FontFamily instance.| 构造器 | 说明 |
|---|---|
Builder(RawFont font) |
Creates a
FontFamily instance using the specified font object. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
FontFamily.Builder |
addRawFont(RawFont font) |
Adds the specified
font to a Builder. |
FontFamily |
build() |
Creates a
FontFamily instance based on the added RawFont. |
public Builder(RawFont font)
FontFamily instance using the specified font object.
A FontFamily is a collection of RawFonts. font is the first element of
the FontFamily.font - Indicates the RawFont object.NullPointerException - Throws this exception if the specified font is null.public FontFamily.Builder addRawFont(RawFont font)
font to a Builder.font - Indicates the RawFont object to add.Builder object.IllegalArgumentException - Throws this exception if the FontFamily already has the
font of the same style.NullPointerException - Throws this exception if the specified font is null.public FontFamily build()
FontFamily instance based on the added RawFont.
If the build fails, null is returned. When this method is used, the null pointer must be checked.
FontFamily instance created.