| Modifier and Type | Field and Description |
|---|---|
| private final FontMetrics | afmStandard14
AFM for standard 14 fonts |
| private float | |
| private final Map | |
| protected static final Matrix | |
| protected final COSDictionary | |
| private PDFontDescriptor | |
| private float | |
| private static final Log | |
| private final CMap | |
| private List |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | |
| public final byte[] | |
| 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 boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| public float | Returns: The width is in 1000 unit of text space, ie 333 or 777Implements org. This will get the average font width for all characters. |
| public COSDictionary | getCOSObject()
Implements org. Convert this standard java object to a COS object. |
| public Vector | Returns: displacement vectorcharacter code code)Returns the displacement vector (w0, w1) in text space, for the given character. |
| public PDFontDescriptor | getFontDescriptor()
Implements org. Returns the font descriptor, may be null. |
| public Matrix | getFontMatrix()
Implements org. Returns the font matrix, which represents the transformation from glyph space to text space. |
| public Vector | getPositionVector(int
character code code)Implements org. Returns the position vector (v), in text space, for the given character. |
| public float | Returns: the width of the space characterDetermines the width of the space character. |
| protected final FontMetrics | |
| protected abstract float | Returns: width in 1/1000 text spacecharacter code code)Returns the glyph width from the AFM if this is a Standard 14 font. |
| public float | Returns: The width of the string in 1/1000 units of text space.The text to get the width of. text)Returns the width of the given Unicode string. |
| public String | |
| protected CMap | |
| public String | |
| public float | getWidth(int
character code code)Implements org. Returns the advance width of the given character, in glyph space. |
| protected final List | |
| public int | |
| public boolean | Returns: true if this font is one of the "Standard 14" fontsReturns true if this font is one of the "Standard 14" fonts and receives special handling. |
| public abstract boolean | Returns: true if the font uses vertical writing modeReturns true if the font uses vertical writing mode. |
| private PDFontDescriptor | |
| private CMap | |
| protected final CMap | |
| public abstract int | Returns: character codestring stream in)Reads a character code from a content stream string. |
| protected final void | setFontDescriptor(PDFontDescriptor
font descriptor of the embedded font fontDescriptor)Sets the font descriptor when embedding a font. |
| public abstract void | |
| public String | |
| public String | |
| public String | Returns: Unicode character(s)character code code)Returns the Unicode character sequence which corresponds to the given character code. |
| public abstract boolean | Returns: true if this font will be subset when embeddedReturns true if this font will be subset when embedded. |
| afmStandard14 | back to summary |
|---|---|
| private final FontMetrics afmStandard14 AFM for standard 14 fonts | |
| avgFontWidth | back to summary |
|---|---|
| private float avgFontWidth | |
| codeToWidthMap | back to summary |
|---|---|
| private final Map<Integer, Float> codeToWidthMap | |
| DEFAULT_FONT_MATRIX | back to summary |
|---|---|
| protected static final Matrix DEFAULT_FONT_MATRIX | |
| dict | back to summary |
|---|---|
| protected final COSDictionary dict | |
| fontDescriptor | back to summary |
|---|---|
| private PDFontDescriptor fontDescriptor | |
| fontWidthOfSpace | back to summary |
|---|---|
| private float fontWidthOfSpace | |
| LOG | back to summary |
|---|---|
| private static final Log LOG | |
| toUnicodeCMap | back to summary |
|---|---|
| private final CMap toUnicodeCMap | |
| widths | back to summary |
|---|---|
| private List<Float> widths | |
| PDFont | back to summary |
|---|---|
| pack-priv PDFont() Constructor for embedding. | |
| PDFont | back to summary |
|---|---|
| pack-priv PDFont(Standard14Fonts. Constructor for Standard 14. | |
| PDFont | back to summary |
|---|---|
| protected PDFont(COSDictionary fontDictionary) Constructor.
| |
| addToSubset | back to summary |
|---|---|
| public abstract void addToSubset(int codePoint) Adds the given Unicode point to the subset.
| |
| encode | back to summary |
|---|---|
| public final byte[] encode(String text) throws IOException Encodes the given string for use in a PDF content stream.
| |
| 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.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getAverageFontWidth | back to summary |
|---|---|
| public float getAverageFontWidth() Implements org. This will get the average font width for all characters.
| |
| getCOSObject | back to summary |
|---|---|
| public COSDictionary getCOSObject() Implements org. Doc from org. Convert this standard java object to a COS object.
| |
| getDisplacement | back to summary |
|---|---|
| public Vector getDisplacement(int code) throws IOException Returns the displacement vector (w0, w1) in text space, for the given character. For horizontal text only the x component is used, for vertical text only the y component.
| |
| getFontDescriptor | back to summary |
|---|---|
| public PDFontDescriptor getFontDescriptor() Implements org. Doc from org. Returns the font descriptor, may be null.
| |
| 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. | |
| 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. | |
| getSpaceWidth | back to summary |
|---|---|
| public float getSpaceWidth() Determines the width of the space character. This is very important for text extraction.
| |
| getStandard14AFM | back to summary |
|---|---|
| protected final FontMetrics getStandard14AFM() Returns the AFM if this is a Standard 14 font.
| |
| getStandard14Width | back to summary |
|---|---|
| protected abstract float getStandard14Width(int code) Returns the glyph width from the AFM if this is a Standard 14 font.
| |
| getStringWidth | back to summary |
|---|---|
| public float getStringWidth(String text) throws IOException Returns the width of the given Unicode string.
| |
| getSubType | back to summary |
|---|---|
| public String getSubType() This will get the subtype of font.
| |
| getToUnicodeCMap | back to summary |
|---|---|
| protected CMap getToUnicodeCMap() Get the /ToUnicode CMap.
| |
| getType | back to summary |
|---|---|
| public String getType() This will always return "Font" for fonts.
| |
| 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.
| |
| getWidths | back to summary |
|---|---|
| protected final List The widths of the characters. This will be null for the standard 14 fonts. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isStandard14 | back to summary |
|---|---|
| public boolean isStandard14() Returns true if this font is one of the "Standard 14" fonts and receives special handling.
| |
| isVertical | back to summary |
|---|---|
| public abstract boolean isVertical() Returns true if the font uses vertical writing mode.
| |
| loadFontDescriptor | back to summary |
|---|---|
| private PDFontDescriptor loadFontDescriptor() | |
| loadUnicodeCmap | back to summary |
|---|---|
| private CMap loadUnicodeCmap() | |
| readCMap | back to summary |
|---|---|
| protected final CMap readCMap(COSBase base) throws IOException Reads a CMap given a COS Stream or Name. May return null if a predefined CMap does not exist.
| |
| readCode | back to summary |
|---|---|
| public abstract int readCode(InputStream in) throws IOException Reads a character code from a content stream string. Codes may be up to 4 bytes long.
| |
| setFontDescriptor | back to summary |
|---|---|
| protected final void setFontDescriptor(PDFontDescriptor fontDescriptor) Sets the font descriptor when embedding a font.
| |
| subset | back to summary |
|---|---|
| public abstract void subset() throws IOException Replaces this font with a subset containing only the given Unicode characters.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |
| toUnicode | back to summary |
|---|---|
| public String toUnicode(int code, GlyphList customGlyphList) Returns the Unicode character sequence which corresponds to the given character code. | |
| toUnicode | back to summary |
|---|---|
| public String toUnicode(int code) Returns the Unicode character sequence which corresponds to the given character code.
| |
| willBeSubset | back to summary |
|---|---|
| public abstract boolean willBeSubset() Returns true if this font will be subset when embedded.
| |