| Modifier and Type | Field and Description |
|---|---|
| private final int[] | |
| private final CmapLookup | |
| private BoundingBox | |
| private Matrix | |
| private final boolean | |
| private final boolean | |
| private static final Log | |
| private final Set | |
| private final OpenTypeFont | |
| private final TrueTypeFont |
| Access | Constructor and Description |
|---|---|
| public | PDCIDFontType2(COSDictionary
The font dictionary according to the PDF specification. fontDictionary, PDType0Font The parent font. parent)Constructor. |
| public | PDCIDFontType2(COSDictionary
The font dictionary according to the PDF specification. fontDictionary, PDType0Font The parent font. parent, TrueTypeFont The true type font used to create the parent font trueTypeFont)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public int | codeToCID(int
character code code)Implements abstract org. Returns the CID for the given character code. |
| public int | Returns: GIDcharacter code code)Implements abstract org. Returns the GID for the given character code. |
| public byte[] | encode(int
Unicode code point. unicode)Implements abstract org. Encodes the given Unicode code point for use in a PDF content stream. |
| public byte[] | encodeGlyphId(int glyphId)
Implements abstract org.
|
| private TrueTypeFont | |
| private BoundingBox | |
| public BoundingBox | getBoundingBox()
Implements org. Returns the font's bounding box. |
| public Matrix | getFontMatrix()
Implements org. Returns the font matrix, which represents the transformation from glyph space to text space. |
| public float | getHeight(int
character code code)Implements org. Returns the height of the given character, in glyph space. |
| public GeneralPath | getNormalizedPath(int
character code in a PDF. Not to be confused with unicode. code)Implements org. Returns the normalized glyph path for the given character code in a PDF. |
| private TTFParser | |
| public GeneralPath | getPath(int
character code in a PDF. Not to be confused with unicode. code)Implements org. Returns the glyph path for the given character code. |
| private GeneralPath | |
| public TrueTypeFont | Returns: the embedded or substituted TrueType fontReturns the embedded or substituted TrueType font. |
| public float | getWidthFromFont(int
character code code)Implements org. Returns the width of a glyph in the embedded font file. |
| public boolean | hasGlyph(int
character code in a PDF. Not to be confused with unicode. code)Implements org. Returns true if this font contains a glyph for the given character code in a PDF. |
| public boolean | isDamaged()
Implements org. Returns true if the embedded font file is damaged. |
| public boolean | isEmbedded()
Implements org. Returns true if the font file is embedded in the PDF. |
| cid2gid | back to summary |
|---|---|
| private final int[] cid2gid | |
| cmap | back to summary |
|---|---|
| private final CmapLookup cmap | |
| fontBBox | back to summary |
|---|---|
| private BoundingBox fontBBox | |
| fontMatrix | back to summary |
|---|---|
| private Matrix fontMatrix | |
| isDamaged | back to summary |
|---|---|
| private final boolean isDamaged | |
| isEmbedded | back to summary |
|---|---|
| private final boolean isEmbedded | |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| noMapping | back to summary |
|---|---|
| private final Set<Integer> noMapping | |
| otf | back to summary |
|---|---|
| private final OpenTypeFont otf | |
| ttf | back to summary |
|---|---|
| private final TrueTypeFont ttf | |
| PDCIDFontType2 | back to summary |
|---|---|
| public PDCIDFontType2(COSDictionary fontDictionary, PDType0Font parent) throws IOException Constructor.
| |
| PDCIDFontType2 | back to summary |
|---|---|
| public PDCIDFontType2(COSDictionary fontDictionary, PDType0Font parent, TrueTypeFont trueTypeFont) throws IOException Constructor.
| |
| codeToCID | back to summary |
|---|---|
| public int codeToCID(int code) Implements abstract org. Doc from org. Returns the CID for the given character code. If not found then CID 0 is returned.
| |
| codeToGID | back to summary |
|---|---|
| public int codeToGID(int code) throws IOException Implements abstract org. Returns the GID for the given character code.
| |
| encode | back to summary |
|---|---|
| public byte[] encode(int unicode) Implements abstract org. Doc from org. Encodes the given Unicode code point for use in a PDF content stream. Content streams use a multi-byte encoding with 1 to 4 bytes. This method is called when embedding text in PDFs and when filling in fields.
| |
| encodeGlyphId | back to summary |
|---|---|
| public byte[] encodeGlyphId(int glyphId) Implements abstract org.
| |
| findFontOrSubstitute | back to summary |
|---|---|
| private TrueTypeFont findFontOrSubstitute() throws IOException | |
| generateBoundingBox | back to summary |
|---|---|
| private BoundingBox generateBoundingBox() throws IOException | |
| getBoundingBox | back to summary |
|---|---|
| public BoundingBox getBoundingBox() throws IOException Implements org. Doc from org. Returns the font's bounding box.
| |
| getFontMatrix | back to summary |
|---|---|
| public Matrix getFontMatrix() Implements org. Doc from org. Returns the font matrix, which represents the transformation from glyph space to text space. | |
| getHeight | back to summary |
|---|---|
| public float getHeight(int code) throws IOException Implements org. Doc from org. Returns the height of the given character, in glyph space. This can be expensive to calculate. Results are only approximate. Warning This method is deprecated in PDFBox 2.0 because there is no meaningful value which it can return. The
| |
| getNormalizedPath | back to summary |
|---|---|
| public GeneralPath getNormalizedPath(int code) throws IOException Implements org. Doc from org. Returns the normalized glyph path for the given character code in a PDF. The resulting path is normalized to the PostScript 1000 unit square, and fallback glyphs are returned where appropriate, e.g. for missing glyphs.
| |
| getParser | back to summary |
|---|---|
| private TTFParser getParser(RandomAccessRead randomAccessRead, boolean isEmbedded) throws IOException | |
| getPath | back to summary |
|---|---|
| public GeneralPath getPath(int code) throws IOException Implements org. Doc from org. Returns the glyph path for the given character code.
| |
| getPathFromOutlines | back to summary |
|---|---|
| private GeneralPath getPathFromOutlines(int code) throws IOException | |
| getTrueTypeFont | back to summary |
|---|---|
| public TrueTypeFont getTrueTypeFont() Returns the embedded or substituted TrueType font. May be an OpenType font if the font is not embedded.
| |
| getWidthFromFont | back to summary |
|---|---|
| public float getWidthFromFont(int code) throws IOException Implements org. Doc from org. Returns the width of a glyph in the embedded font file.
| |
| hasGlyph | back to summary |
|---|---|
| public boolean hasGlyph(int code) throws IOException Implements org. Doc from org. Returns true if this font contains a glyph for the given character code in a PDF.
| |
| isDamaged | back to summary |
|---|---|
| public boolean isDamaged() Implements org. Doc from org. Returns true if the embedded font file is damaged.
| |
| isEmbedded | back to summary |
|---|---|
| public boolean isEmbedded() Implements org. Doc from org. Returns true if the font file is embedded in the PDF.
| |