| Modifier and Type | Field and Description |
|---|---|
| private Float | |
| private int[] | |
| private final CFFCIDFont | |
| private BoundingBox | |
| private Matrix | |
| private final AffineTransform | |
| private final Map | |
| private final boolean | |
| private final boolean | |
| private static final Log | |
| private final FontBoxFont |
| Access | Constructor and Description |
|---|---|
| public | PDCIDFontType0(COSDictionary
The font dictionary according to the PDF specification. fontDictionary, PDType0Font The parent font. parent)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: CIDcharacter code code)Implements abstract org. Returns the CID for the given character code. |
| public int | codeToGID(int
character 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 BoundingBox | |
| private float | |
| public float | getAverageFontWidth()
Overrides org. Implements org. This will get the average font width for all characters. |
| public BoundingBox | getBoundingBox()
Implements org. Returns the font's bounding box. |
| public CFFFont | Returns: the embedded CFF CIDFont or nullReturns the embedded CFF CIDFont, or null if the substitute is not a CFF font. |
| public FontBoxFont | |
| public final Matrix | getFontMatrix()
Implements org. Returns the font matrix, which represents the transformation from glyph space to text space. |
| private String | |
| 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. |
| 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. |
| public Type2CharString | Returns: the Type 2 charstring for the given CID or nullCID cid)Returns the Type 2 charstring for the given CID, or null if the substituted font does not contain Type 2 charstrings. |
| 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. |
| avgWidth | back to summary |
|---|---|
| private Float avgWidth | |
| cid2gid | back to summary |
|---|---|
| private int[] cid2gid | |
| cidFont | back to summary |
|---|---|
| private final CFFCIDFont cidFont | |
| fontBBox | back to summary |
|---|---|
| private BoundingBox fontBBox | |
| fontMatrix | back to summary |
|---|---|
| private Matrix fontMatrix | |
| fontMatrixTransform | back to summary |
|---|---|
| private final AffineTransform fontMatrixTransform | |
| glyphHeights | back to summary |
|---|---|
| private final Map<Integer, Float> glyphHeights | |
| 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 | |
| t1Font | back to summary |
|---|---|
| private final FontBoxFont t1Font | |
| PDCIDFontType0 | back to summary |
|---|---|
| public PDCIDFontType0(COSDictionary fontDictionary, PDType0Font parent) throws IOException Constructor.
| |
| codeToCID | back to summary |
|---|---|
| public int codeToCID(int code) Implements abstract 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) Implements abstract org. Doc from 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.
| |
| generateBoundingBox | back to summary |
|---|---|
| private BoundingBox generateBoundingBox() | |
| getAverageCharacterWidth | back to summary |
|---|---|
| private float getAverageCharacterWidth() | |
| getAverageFontWidth | back to summary |
|---|---|
| public float getAverageFontWidth() Overrides org. Implements org. Doc from org. This will get the average font width for all characters.
| |
| getBoundingBox | back to summary |
|---|---|
| public BoundingBox getBoundingBox() Implements org. Doc from org. Returns the font's bounding box.
| |
| getCFFFont | back to summary |
|---|---|
| public CFFFont getCFFFont() Returns the embedded CFF CIDFont, or null if the substitute is not a CFF font.
| |
| getFontBoxFont | back to summary |
|---|---|
| public FontBoxFont getFontBoxFont() Returns the embedded or substituted font.
| |
| getFontMatrix | back to summary |
|---|---|
| public final Matrix getFontMatrix() Implements org. Doc from org. Returns the font matrix, which represents the transformation from glyph space to text space. | |
| getGlyphName | back to summary |
|---|---|
| private String getGlyphName(int code) Returns the name of the glyph with the given character code. This is done by looking up the code in the parent font's ToUnicode map and generating a glyph name from that. | |
| 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.
| |
| 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.
| |
| getType2CharString | back to summary |
|---|---|
| public Type2CharString getType2CharString(int cid) throws IOException Returns the Type 2 charstring for the given CID, or null if the substituted font does not contain Type 2 charstrings.
| |
| 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.
| |