It is not usually necessary to use this class directly, prefer PDType0Font.
| Modifier and Type | Field and Description |
|---|---|
| private float | |
| private float | |
| protected final COSDictionary | |
| private final float[] | |
| private PDFontDescriptor | |
| private static final Log | |
| protected final PDType0Font | |
| private final Map | |
| private final Map | |
| private Map |
| Access | Constructor and Description |
|---|---|
| pack-priv | PDCIDFont(COSDictionary
The font dictionary according to the PDF specification. fontDictionary, PDType0Font parent)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| public abstract int | |
| public abstract int | |
| protected abstract byte[] | Returns: Array of 1 to 4 PDF content stream bytes.Unicode code point. unicode)Encodes the given Unicode code point for use in a PDF content stream. |
| public abstract byte[] | |
| public float | getAverageFontWidth()
Implements org. This will get the average font width for all characters. |
| public String | |
| public PDCIDSystemInfo | Returns: the CIDSystemInfo, or nullReturns the CIDSystemInfo, or null if it is missing (which isn't allowed but could happen). |
| public COSDictionary | getCOSObject()
Implements org. Convert this standard java object to a COS object. |
| private Vector | |
| private float | Returns: The default width for the glyphs in this font.This will get the default width. |
| public PDFontDescriptor | getFontDescriptor()
Implements org. Returns the font descriptor, may be null. |
| public String | getName()
Implements org. Returns the name of this font, either the PostScript "BaseName" or the Type 3 "Name". |
| public final PDType0Font | |
| public Vector | getPositionVector(int
character code code)Implements org. Returns the position vector (v), in text space, for the given character. |
| public float | Returns: w1ycharacter code code)Returns the y-component of the vertical displacement vector (w1). |
| public float | getWidth(int
character code code)Implements org. Returns the advance width of the given character, in glyph space. |
| private float | |
| public boolean | hasExplicitWidth(int
character code code)Implements org. Returns true if the Font dictionary specifies an explicit width for the given glyph. |
| pack-priv final int[] | |
| private void | |
| private void |
| averageWidth | back to summary |
|---|---|
| private float averageWidth | |
| defaultWidth | back to summary |
|---|---|
| private float defaultWidth | |
| dict | back to summary |
|---|---|
| protected final COSDictionary dict | |
| dw2 | back to summary |
|---|---|
| private final float[] dw2 | |
| fontDescriptor | back to summary |
|---|---|
| private PDFontDescriptor fontDescriptor | |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| parent | back to summary |
|---|---|
| protected final PDType0Font parent | |
| positionVectors | back to summary |
|---|---|
| private final Map<Integer, Vector> positionVectors | |
| verticalDisplacementY | back to summary |
|---|---|
| private final Map<Integer, Float> verticalDisplacementY | |
| widths | back to summary |
|---|---|
| private Map<Integer, Float> widths | |
| PDCIDFont | back to summary |
|---|---|
| pack-priv PDCIDFont(COSDictionary fontDictionary, PDType0Font parent) Constructor.
| |
| codeToCID | back to summary |
|---|---|
| public abstract int codeToCID(int code) Returns the CID for the given character code. If not found then CID 0 is returned.
| |
| codeToGID | back to summary |
|---|---|
| public abstract int codeToGID(int code) throws IOException Returns the GID for the given character code.
| |
| encode | back to summary |
|---|---|
| protected abstract byte[] encode(int unicode) throws IOException 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 abstract byte[] encodeGlyphId(int glyphId) | |
| getAverageFontWidth | back to summary |
|---|---|
| public float getAverageFontWidth() Implements org. Doc from org. This will get the average font width for all characters.
| |
| getBaseFont | back to summary |
|---|---|
| public String getBaseFont() The PostScript name of the font.
| |
| getCIDSystemInfo | back to summary |
|---|---|
| public PDCIDSystemInfo getCIDSystemInfo() Returns the CIDSystemInfo, or null if it is missing (which isn't allowed but could happen).
| |
| getCOSObject | back to summary |
|---|---|
| public COSDictionary getCOSObject() Implements org. Doc from org. Convert this standard java object to a COS object.
| |
| getDefaultPositionVector | back to summary |
|---|---|
| private Vector getDefaultPositionVector(int cid) Returns the default position vector (v).
| |
| getDefaultWidth | back to summary |
|---|---|
| private float getDefaultWidth() This will get the default width. The default value for the default width is 1000.
| |
| getFontDescriptor | back to summary |
|---|---|
| public PDFontDescriptor getFontDescriptor() Implements org. Doc from org. Returns the font descriptor, may be null.
| |
| getName | back to summary |
|---|---|
| public String getName() Implements org. Doc from org. Returns the name of this font, either the PostScript "BaseName" or the Type 3 "Name". | |
| getParent | back to summary |
|---|---|
| public final PDType0Font getParent() Returns the Type 0 font which is the parent of this font.
| |
| getPositionVector | back to summary |
|---|---|
| public Vector getPositionVector(int code) Implements org. Doc from org. Returns the position vector (v), in text space, for the given character. This represents the position of vertical origin relative to horizontal origin, for horizontal writing it will always be (0, 0). For vertical writing both x and y are set. | |
| getVerticalDisplacementVectorY | back to summary |
|---|---|
| public float getVerticalDisplacementVectorY(int code) Returns the y-component of the vertical displacement vector (w1).
| |
| getWidth | back to summary |
|---|---|
| public float getWidth(int code) throws IOException Implements org. Doc from org. Returns the advance width of the given character, in glyph space. If you want the visual bounds of the glyph then call getPath(..) on the appropriate PDFont subclass to retrieve the glyph outline as a GeneralPath instead. See the cyan rectangles in the DrawPrintTextLocations.java example to see this in action.
| |
| getWidthForCID | back to summary |
|---|---|
| private float getWidthForCID(int cid) | |
| hasExplicitWidth | back to summary |
|---|---|
| public boolean hasExplicitWidth(int code) throws IOException Implements org. Doc from org. Returns true if the Font dictionary specifies an explicit width for the given glyph. This includes Width, W but not default widths entries.
| |
| readCIDToGIDMap | back to summary |
|---|---|
| pack-priv final int[] readCIDToGIDMap() throws IOException | |
| readVerticalDisplacements | back to summary |
|---|---|
| private void readVerticalDisplacements() | |
| readWidths | back to summary |
|---|---|
| private void readWidths() | |