Class PDFEncodingBuilder

  • Direct Known Subclasses:
    PDFEncodingBuilderImpl

    public abstract class PDFEncodingBuilder
    extends java.lang.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 Detail

      • PDFEncodingBuilder

        public PDFEncodingBuilder()
    • Method Detail

      • 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.