Class FontSpecifier.Builder

java.lang.Object
de.xima.fc.common.text.shape.FontSpecifier.Builder
Enclosing class:
FontSpecifier

public static final class FontSpecifier.Builder extends Object
A builder for FontSpecifier.
Since:
8.4.0
  • Method Details

    • build

      public FontSpecifier build()
      Creates a new font specifier from the current settings.
      Returns:
      A new font specifier.
    • collectionIndex

      public FontSpecifier.Builder collectionIndex(int 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

      public FontSpecifier.Builder data(String path)
      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

      public FontSpecifier.Builder data(Path path)
      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

      public FontSpecifier.Builder featureContextualLigatures()
      Enables the font feature for contextual ligatures.
      Returns:
      This builder for chaining method calls.
    • featureDiscretionaryLigatures

      public FontSpecifier.Builder featureDiscretionaryLigatures()
      Enables the font feature for discretionary ligatures.
      Returns:
      This builder for chaining method calls.
    • featureGlyphCompositionDecomposition

      public FontSpecifier.Builder featureGlyphCompositionDecomposition()
      Enables the font feature for glyph composition and decomposition.
      Returns:
      This builder for chaining method calls.
    • featureHistoricalLigatures

      public FontSpecifier.Builder featureHistoricalLigatures()
      Enables the font feature for historical ligatures.
      Returns:
      This builder for chaining method calls.
    • featureKerning

      public FontSpecifier.Builder featureKerning()
      Enables the font feature for kerning.
      Returns:
      This builder for chaining method calls.
    • featureLiningFigures

      public FontSpecifier.Builder featureLiningFigures()
      Enables the font feature for lining figures.
      Returns:
      This builder for chaining method calls.
    • featureOldStyleFigures

      public FontSpecifier.Builder featureOldStyleFigures()
      Enables the font feature for old style figures.
      Returns:
      This builder for chaining method calls.
    • featureProportionalFigures

      public FontSpecifier.Builder featureProportionalFigures()
      Enables the font feature for proportional figures.
      Returns:
      This builder for chaining method calls.
    • featureRequiredLigatures

      public FontSpecifier.Builder featureRequiredLigatures()
      Enables the font feature for required ligatures.
      Returns:
      This builder for chaining method calls.
    • featureStandardLigatures

      public FontSpecifier.Builder featureStandardLigatures()
      Enables the font feature for standard ligatures.
      Returns:
      This builder for chaining method calls.
    • featureStylisticSet

      public FontSpecifier.Builder featureStylisticSet(int stylisticSet)
      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

      public FontSpecifier.Builder featureTabularFigures()
      Enables the font feature for tabular figures.
      Returns:
      This builder for chaining method calls.
    • featureVerticalAlternates

      public FontSpecifier.Builder featureVerticalAlternates()
      Enables the font feature for vertical alternates.
      Returns:
      This builder for chaining method calls.
    • featureVerticalAlternatesAndRotation

      public FontSpecifier.Builder featureVerticalAlternatesAndRotation()
      Enables the font feature for vertical alternates and rotation.
      Returns:
      This builder for chaining method calls.