Class FontSpecifier
java.lang.Object
de.xima.fc.common.text.shape.FontSpecifier
A font specifier for the text shapers such as
FontTextShaperBuilder.- Since:
- 8.4.0
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic FontSpecifier.BuilderbyFileName(String fileName) Creates a new builder for a font specifier based on the file name.intGets the collection index of the font. -1 when not a collection.booleaninthashCode()id()Gets the unique ID of the font.static FontSpecifier.BuilderCreates a new builder for an OpenType font specifier.toString()static FontSpecifier.BuilderCreates a new builder for a TrueType font specifier.
-
Method Details
-
collectionIndex
public int collectionIndex()Gets the collection index of the font. -1 when not a collection.- Returns:
- The type of the font.
-
equals
-
hashCode
-
id
-
toString
-
byFileName
Creates a new builder for a font specifier based on the file name. The file name should include the extension, e.g. "LiberationMono-BoldItalic.ttf". The base name is used as the font ID, and the extension is used to determine the font type.- Parameters:
fileName- The file name of the font file.- Returns:
- A new builder for a font specifier.
-
openType
Creates a new builder for an OpenType font specifier.- Parameters:
id- The unique identifier of the font, including its style and variation, e.g. "LiberationMono-BoldItalic".- Returns:
- A new builder for an OpenType font specifier.
-
trueType
Creates a new builder for a TrueType font specifier.- Parameters:
id- The unique identifier of the font, including its style and variation, e.g. "LiberationMono-BoldItalic".- Returns:
- A new builder for a TrueType font specifier.
-