org.apache.fop.fonts

## Class EmbedFontInfo

- java.lang.Object
- - org.apache.fop.fonts.EmbedFontInfo

- All Implemented Interfaces:
    java.io.Serializable

      public class EmbedFontInfo
      extends java.lang.Object
      implements java.io.Serializable

  FontInfo contains meta information on fonts (where is the metrics file etc.) TODO: We need to remove this class and think about more intelligent design patterns (Data classes => Procedural code)
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected boolean` | `advanced` false, to disable advanced typographic features
    `protected boolean` | `kerning` false, to disable kerning
    `protected java.lang.String` | `postScriptName` the PostScript name of the font
    `protected java.lang.String` | `subFontName` the sub-fontname of the font (used for TrueType Collections, null otherwise)

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EmbedFontInfo(FontUris fontUris, boolean kerning, boolean advanced, java.util.List<FontTriplet> fontTriplets, java.lang.String subFontName)` Main constructor
    `EmbedFontInfo(FontUris fontUris, boolean kerning, boolean advanced, java.util.List<FontTriplet> fontTriplets, java.lang.String subFontName, EncodingMode encodingMode, EmbeddingMode embeddingMode)` Main constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getAdvanced()` Determines if advanced typographic features are enabled
    `EmbeddingMode` | `getEmbeddingMode()` Returns the embedding mode for this font.
    `java.net.URI` | `getEmbedURI()` Returns the URI to the embeddable font resource
    `EncodingMode` | `getEncodingMode()` Returns the requested encoding mode for this font.
    `java.util.List<FontTriplet>` | `getFontTriplets()` Returns the list of font triplets associated with this font.
    `FontUris` | `getFontUris()`
    `boolean` | `getKerning()` Determines if kerning is enabled
    `java.net.URI` | `getMetricsURI()` Returns the URI of the metrics XML resource
    `java.lang.String` | `getPostScriptName()` Returns the PostScript name of the font.
    `java.lang.String` | `getSubFontName()` Returns the sub-font name of the font.
    `boolean` | `isEmbedded()` Indicates whether the font is only referenced rather than embedded.
    `void` | `setEmbedded(boolean value)` Defines whether the font is embedded or not.
    `void` | `setPostScriptName(java.lang.String postScriptName)` Sets the PostScript name of the font
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### kerning

          protected final boolean kerning

      false, to disable kerning

    - #### advanced

          protected final boolean advanced

      false, to disable advanced typographic features

    - #### postScriptName

          protected java.lang.String postScriptName

      the PostScript name of the font

    - #### subFontName

          protected java.lang.String subFontName

      the sub-fontname of the font (used for TrueType Collections, null otherwise)

  - ### Constructor Detail

    - #### EmbedFontInfo

          public EmbedFontInfo(FontUris fontUris,
                               boolean kerning,
                               boolean advanced,
                               java.util.List<FontTriplet> fontTriplets,
                               java.lang.String subFontName,
                               EncodingMode encodingMode,
                               EmbeddingMode embeddingMode)

      Main constructor
      Parameters:
        `metricsURI` - the URI of the XML resource containing font metrics
        `kerning` - True if kerning should be enabled
        `advanced` - true if advanced typography features should be enabled
        `fontTriplets` - List of font triplets to associate with this font
        `embedURI` - Path to the embeddable font file (may be null)
        `subFontName` - the sub-fontname used for TrueType Collections (null otherwise)
        `encodingMode` - the encoding mode to use for this font

    - #### EmbedFontInfo

          public EmbedFontInfo(FontUris fontUris,
                               boolean kerning,
                               boolean advanced,
                               java.util.List<FontTriplet> fontTriplets,
                               java.lang.String subFontName)

      Main constructor
      Parameters:
        `metricsURI` - the URI of the XML resource containing font metrics
        `kerning` - True if kerning should be enabled
        `fontTriplets` - List of font triplets to associate with this font
        `embedURI` - Path to the embeddable font file (may be null)
        `subFontName` - the sub-fontname used for TrueType Collections (null otherwise)

  - ### Method Detail

    - #### getMetricsURI

          public java.net.URI getMetricsURI()

      Returns the URI of the metrics XML resource
      Returns:
        the metrics file path

    - #### getEmbedURI

          public java.net.URI getEmbedURI()

      Returns the URI to the embeddable font resource
      Returns:
        the font resource URI

    - #### getKerning

          public boolean getKerning()

      Determines if kerning is enabled
      Returns:
        true if enabled

    - #### getAdvanced

          public boolean getAdvanced()

      Determines if advanced typographic features are enabled
      Returns:
        true if enabled

    - #### getSubFontName

          public java.lang.String getSubFontName()

      Returns the sub-font name of the font. This is primarily used for TrueType Collections to select one of the sub-fonts. For all other fonts, this is always null.
      Returns:
        the sub-font name (or null)

    - #### getPostScriptName

          public java.lang.String getPostScriptName()

      Returns the PostScript name of the font.
      Returns:
        the PostScript name

    - #### setPostScriptName

          public void setPostScriptName(java.lang.String postScriptName)

      Sets the PostScript name of the font
      Parameters:
        `postScriptName` - the PostScript name

    - #### getFontTriplets

          public java.util.List<FontTriplet> getFontTriplets()

      Returns the list of font triplets associated with this font.
      Returns:
        List of font triplets

    - #### isEmbedded

          public boolean isEmbedded()

      Indicates whether the font is only referenced rather than embedded.
      Returns:
        true if the font is embedded, false if it is referenced.

    - #### getEmbeddingMode

          public EmbeddingMode getEmbeddingMode()

      Returns the embedding mode for this font.
      Returns:
        the embedding mode.

    - #### setEmbedded

          public void setEmbedded(boolean value)

      Defines whether the font is embedded or not.
      Parameters:
        `value` - true to embed the font, false to reference it

    - #### getEncodingMode

          public EncodingMode getEncodingMode()

      Returns the requested encoding mode for this font.
      Returns:
        the encoding mode

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### getFontUris

          public FontUris getFontUris()

Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.