| Modifier and Type | Field and Description |
|---|---|
| private COSDictionary | |
| private BoundingBox | |
| private Matrix | |
| private static final Log | LOG
Log instance.
|
| private final ResourceCache | |
| private PDResources |
| Access | Constructor and Description |
|---|---|
| public | PDType3Font(COSDictionary
The font dictionary according to the PDF specification. fontDictionary)Constructor. |
| public | PDType3Font(COSDictionary
The font dictionary according to the PDF specification. fontDictionary, ResourceCache Resource cache, can be null. resourceCache)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| protected byte[] | encode(int
Unicode code point. unicode)Implements abstract org. Encodes the given Unicode code point for use in a PDF content stream. |
| private BoundingBox | |
| public BoundingBox | getBoundingBox()
Implements org. Returns the font's bounding box. |
| public PDType3CharProc | Returns: the stream to be used to render the glyphcharacter code code)Returns the stream of the glyph for the given character code |
| public COSDictionary | Returns: the dictionary containing all glyph streams.Returns the dictionary containing all streams to be used to render the glyphs. |
| public Vector | getDisplacement(int
character code code)Overrides org. Returns the displacement vector (w0, w1) in text space, for the given character. |
| public PDRectangle | Returns: The fonts bounding box.This will get the fonts bounding box from its dictionary. |
| public FontBoxFont | getFontBoxFont()
Implements abstract org. Returns the embedded or system font used for rendering. |
| public Matrix | getFontMatrix()
Overrides org. 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 String | getName()
Implements org. Returns the name of this font, either the PostScript "BaseName" or the Type 3 "Name". |
| public GeneralPath | getPath(String
glyph name name)Implements abstract org. Returns the path for the character with the given name. |
| public PDResources | Returns: the resources bound to be used when parsing the type3 streamReturns the optional resources of the type3 stream. |
| public float | getWidth(int
character code code)Overrides org. Implements org. Returns the advance width of the given character, in glyph space. |
| public float | getWidthFromFont(int
character code code)Implements org. Returns the width of a glyph in the embedded font file. |
| public boolean | hasGlyph(String
glyph name name)Implements abstract org. Returns true if the font contains the character with the given name. |
| public boolean | isDamaged()
Implements org. Returns true if the embedded font file is damaged. |
| public boolean | Returns: true because type 3 fonts are embedded by design.Implements org. Returns true if the font file is embedded in the PDF. |
| protected Boolean | isFontSymbolic()
Overrides org. Internal implementation of isSymbolic, allowing for the fact that the result may be indeterminate. |
| public boolean | isStandard14()
Overrides org. Returns true if this font is one of the "Standard 14" fonts and receives special handling. |
| public int | readCode(InputStream
string stream in)Implements abstract org. Reads a character code from a content stream string. |
| protected final void | readEncoding()
Overrides org. Reads the Encoding from the Font dictionary or the embedded or substituted font file. |
| protected Encoding | readEncodingFromFont()
Implements abstract org. Called by readEncoding() if the encoding needs to be extracted from the font file. |
| charProcs | back to summary |
|---|---|
| private COSDictionary charProcs | |
| fontBBox | back to summary |
|---|---|
| private BoundingBox fontBBox | |
| fontMatrix | back to summary |
|---|---|
| private Matrix fontMatrix | |
| LOG | back to summary |
|---|---|
| private static final Log LOG Hides org. Log instance. | |
| resourceCache | back to summary |
|---|---|
| private final ResourceCache resourceCache | |
| resources | back to summary |
|---|---|
| private PDResources resources | |
| PDType3Font | back to summary |
|---|---|
| public PDType3Font(COSDictionary fontDictionary) throws IOException Constructor.
| |
| PDType3Font | back to summary |
|---|---|
| public PDType3Font(COSDictionary fontDictionary, ResourceCache resourceCache) throws IOException Constructor.
| |
| checkFontMatrixValues | back to summary |
|---|---|
| private boolean checkFontMatrixValues(COSArray matrix) | |
| encode | back to summary |
|---|---|
| protected byte[] encode(int unicode) throws IOException 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.
| |
| generateBoundingBox | back to summary |
|---|---|
| private BoundingBox generateBoundingBox() | |
| getBoundingBox | back to summary |
|---|---|
| public BoundingBox getBoundingBox() Implements org. Doc from org. Returns the font's bounding box.
| |
| getCharProc | back to summary |
|---|---|
| public PDType3CharProc getCharProc(int code) Returns the stream of the glyph for the given character code
| |
| getCharProcs | back to summary |
|---|---|
| public COSDictionary getCharProcs() Returns the dictionary containing all streams to be used to render the glyphs.
| |
| getDisplacement | back to summary |
|---|---|
| public Vector getDisplacement(int code) throws IOException Overrides org. Doc from org. 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.
| |
| getFontBBox | back to summary |
|---|---|
| public PDRectangle getFontBBox() This will get the fonts bounding box from its dictionary.
| |
| getFontBoxFont | back to summary |
|---|---|
| public FontBoxFont getFontBoxFont() Implements abstract org. Doc from org. Returns the embedded or system font used for rendering. This is never null.
| |
| getFontMatrix | back to summary |
|---|---|
| public Matrix getFontMatrix() Overrides org. 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
| |
| 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". | |
| getPath | back to summary |
|---|---|
| public GeneralPath getPath(String name) throws IOException Implements abstract org. Doc from org. Returns the path for the character with the given name. For some fonts, GIDs may be used instead of names when calling this method. *
| |
| getResources | back to summary |
|---|---|
| public PDResources getResources() Returns the optional resources of the type3 stream.
| |
| getWidth | back to summary |
|---|---|
| public float getWidth(int code) throws IOException Overrides org. 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.
| |
| 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(String name) throws IOException Implements abstract org. Doc from org. Returns true if the font contains the character with the given name.
| |
| 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.
| |
| isFontSymbolic | back to summary |
|---|---|
| protected Boolean isFontSymbolic() Overrides org. Doc from org. Internal implementation of isSymbolic, allowing for the fact that the result may be indeterminate. | |
| isStandard14 | back to summary |
|---|---|
| public boolean isStandard14() Overrides org. Doc from org. Returns true if this font is one of the "Standard 14" fonts and receives special handling.
| |
| readCode | back to summary |
|---|---|
| public int readCode(InputStream in) throws IOException Implements abstract org. Doc from org. Reads a character code from a content stream string. Codes may be up to 4 bytes long.
| |
| readEncoding | back to summary |
|---|---|
| protected final void readEncoding() throws IOException Overrides org. Doc from org. Reads the Encoding from the Font dictionary or the embedded or substituted font file. Must be called at the end of any subclass constructors.
| |
| readEncodingFromFont | back to summary |
|---|---|
| protected Encoding readEncodingFromFont() throws IOException Implements abstract org. Doc from org. Called by readEncoding() if the encoding needs to be extracted from the font file.
| |