public interface PDFontLike
Modifier and Type | Method and Description |
---|---|
float |
getAverageFontWidth()
This will get the average font width for all characters.
|
org.apache.fontbox.util.BoundingBox |
getBoundingBox()
Returns the font's bounding box.
|
PDFontDescriptor |
getFontDescriptor()
Returns the font descriptor, may be null.
|
Matrix |
getFontMatrix()
Returns the font matrix, which represents the transformation from glyph space to text space.
|
float |
getHeight(int code)
Deprecated.
Use
#getBoundingBox().#getHeight(int) instead. |
String |
getName()
Returns the name of this font, either the PostScript "BaseName" or the Type 3 "Name".
|
Vector |
getPositionVector(int code)
Returns the position vector (v), in text space, for the given character.
|
float |
getWidth(int code)
Returns the advance width of the given character, in glyph space.
|
float |
getWidthFromFont(int code)
Returns the width of a glyph in the embedded font file.
|
boolean |
isDamaged()
Returns true if the embedded font file is damaged.
|
boolean |
isEmbedded()
Returns true if the font file is embedded in the PDF.
|
String getName()
PDFontDescriptor getFontDescriptor()
Matrix getFontMatrix()
org.apache.fontbox.util.BoundingBox getBoundingBox() throws IOException
IOException
Vector getPositionVector(int code)
code
- character code@Deprecated float getHeight(int code) throws IOException
#getBoundingBox().#getHeight(int)
instead.getWidth(int)
method returns the advance width of a glyph,
but there is no corresponding advance height. The logical height of a character is the same
for every character in a font, so if you want that, retrieve the font bbox's height.
Otherwise 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.code
- character codeIOException
float getWidth(int code) throws IOException
code
- character codeIOException
float getWidthFromFont(int code) throws IOException
code
- character codeIOException
- if the font could not be readboolean isEmbedded()
boolean isDamaged()
float getAverageFontWidth()
Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.