Package com.adobe.fontengine.font
Class PDFEncodingBuilder
java.lang.Object
com.adobe.fontengine.font.PDFEncodingBuilder
- Direct Known Subclasses:
PDFEncodingBuilderImpl
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.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intgetCodePoint(int subsetGlyphID, PDFEncodingBuilder.Encoding e) Fetch the codepoint associated with a glyph in the encoding e.abstract PDFEncodingBuilder.EncodinggetEncoding(int subsetGlyphID) Fetch the encoding that can be used with a glyph.static PDFEncodingBuildergetInstance(Font font, Subset subset) Creates an instance of a PDFEncodingBuilder to be used with a given Font and Subset.
-
Constructor Details
-
PDFEncodingBuilder
public PDFEncodingBuilder()
-
-
Method Details
-
getInstance
public static PDFEncodingBuilder getInstance(Font font, Subset subset) throws InvalidFontException, UnsupportedFontException, FontLoadingException 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:
InvalidFontExceptionUnsupportedFontExceptionFontLoadingException
-
getCodePoint
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
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.
-