Class FontSpecifier.Builder
java.lang.Object
de.xima.fc.common.text.shape.FontSpecifier.Builder
- Enclosing class:
FontSpecifier
A builder for
FontSpecifier.- Since:
- 8.4.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Creates a new font specifier from the current settings.collectionIndex(int collectionIndex) If the input is a font collection (*.otc or *.ttc), sets the collection index to select the font to use.data(IThrowingSupplier<InputStream> data) Sets the input stream of the font data.Sets the path of the input font file.Sets the path of the input font file.Enables the font feature for contextual ligatures.Enables the font feature for discretionary ligatures.Enables the font feature for glyph composition and decomposition.Enables the font feature for historical ligatures.Enables the font feature for kerning.Enables the font feature for lining figures.Enables the font feature for old style figures.Enables the font feature for proportional figures.Enables the font feature for required ligatures.Enables the font feature for standard ligatures.featureStylisticSet(int stylisticSet) Enables the font feature for a certain stylistic set.Enables the font feature for tabular figures.Enables the font feature for vertical alternates.Enables the font feature for vertical alternates and rotation.
-
Method Details
-
build
Creates a new font specifier from the current settings.- Returns:
- A new font specifier.
-
collectionIndex
If the input is a font collection (*.otc or *.ttc), sets the collection index to select the font to use.- Parameters:
collectionIndex- The index of the font in the collection. Must be >= 0.- Returns:
- This builder for chaining method calls.
-
data
Sets the path of the input font file. This is required.- Parameters:
path- The path of the input font file. Must not be null.- Returns:
- This builder for chaining method calls.
-
data
Sets the path of the input font file. This is required.- Parameters:
path- The path of the input font file. Must not be null.- Returns:
- This builder for chaining method calls.
-
data
Sets the input stream of the font data. This is required.- Parameters:
data- The supplier for the input stream of the font data. Must not be null.- Returns:
- This builder for chaining method calls.
-
featureContextualLigatures
Enables the font feature for contextual ligatures.- Returns:
- This builder for chaining method calls.
-
featureDiscretionaryLigatures
Enables the font feature for discretionary ligatures.- Returns:
- This builder for chaining method calls.
-
featureGlyphCompositionDecomposition
Enables the font feature for glyph composition and decomposition.- Returns:
- This builder for chaining method calls.
-
featureHistoricalLigatures
Enables the font feature for historical ligatures.- Returns:
- This builder for chaining method calls.
-
featureKerning
Enables the font feature for kerning.- Returns:
- This builder for chaining method calls.
-
featureLiningFigures
Enables the font feature for lining figures.- Returns:
- This builder for chaining method calls.
-
featureOldStyleFigures
Enables the font feature for old style figures.- Returns:
- This builder for chaining method calls.
-
featureProportionalFigures
Enables the font feature for proportional figures.- Returns:
- This builder for chaining method calls.
-
featureRequiredLigatures
Enables the font feature for required ligatures.- Returns:
- This builder for chaining method calls.
-
featureStandardLigatures
Enables the font feature for standard ligatures.- Returns:
- This builder for chaining method calls.
-
featureStylisticSet
Enables the font feature for a certain stylistic set.- Parameters:
stylisticSet- The stylistic set to enable. Must be between 1 and 20.- Returns:
- This builder for chaining method calls.
-
featureTabularFigures
Enables the font feature for tabular figures.- Returns:
- This builder for chaining method calls.
-
featureVerticalAlternates
Enables the font feature for vertical alternates.- Returns:
- This builder for chaining method calls.
-
featureVerticalAlternatesAndRotation
Enables the font feature for vertical alternates and rotation.- Returns:
- This builder for chaining method calls.
-