Class PDFEncodingBuilder

java.lang.Object
com.adobe.fontengine.font.PDFEncodingBuilder
Direct Known Subclasses:
PDFEncodingBuilderImpl

public abstract class PDFEncodingBuilder extends Object
An object that aids in creation of composite fonts for nonembeddable fonts with pdf. This object can enumerate encodings and codepoints are directly mapped to glyphs in a font. Only encodings that can be mapped to CMaps that can be used as encodings with composite fonts are described.
  • Constructor Details

    • PDFEncodingBuilder

      public PDFEncodingBuilder()
  • Method Details

    • getInstance

      Creates an instance of a PDFEncodingBuilder to be used with a given Font and Subset.
      Parameters:
      font -
      subset -
      Returns:
      a PDFEncodingBuilder that can be used with the Font and Subset or null if no such encoding builder can be created.
      Throws:
      InvalidFontException
      UnsupportedFontException
      FontLoadingException
    • getCodePoint

      public abstract int getCodePoint(int subsetGlyphID, PDFEncodingBuilder.Encoding e)
      Fetch the codepoint associated with a glyph in the encoding e.
      Parameters:
      subsetGlyphID - the glyphID in a subset of a font.
      e - The encoding to fetch. e must have been returned from this.getEncoding with the same subsetGlyphID.
      Returns:
      the code point.
    • getEncoding

      public abstract PDFEncodingBuilder.Encoding getEncoding(int subsetGlyphID)
      Fetch the encoding that can be used with a glyph.
      Parameters:
      subsetGlyphID - the glyphID in a subset of the font.
      Returns:
      The encoding to be used or null if subsetGlyphID is not directly encoded in the font.