COSObjectablepublic class PDType0Font extends PDSimpleFont
cmap, cmapObjects, font, fontMatrix, resourceRootCMAP, toUnicodeCmap| Constructor | Description |
|---|---|
PDType0Font() |
Constructor.
|
PDType0Font(COSDictionary fontDictionary) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
clear() |
Calling this will release all cached information.
|
java.lang.String |
encode(byte[] c,
int offset,
int length) |
This will perform the encoding of a character if needed.
|
float |
getAverageFontWidth() |
This will get the average font width for all characters.
|
java.awt.Font |
getawtFont() |
Looks up, creates, returns the AWT Font.
|
PDFont |
getDescendantFont() |
Provides the descendant font.
|
PDRectangle |
getFontBoundingBox() |
This will get the fonts bounding box.
|
float |
getFontHeight(byte[] c,
int offset,
int length) |
This will get the font height for a character.
|
float |
getFontWidth(byte[] c,
int offset,
int length) |
This will get the font width for a character.
|
float |
getFontWidth(int charCode) |
Determines the width of the given character.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitclearResources, cmapEncoding, drawString, encodeToCID, equals, getAFM, getAverageFontWidthFromAFMFile, getBaseFont, getCodeFromArray, getCOSObject, getEncoding, getFirstChar, getFontDescriptor, getFontEncoding, getFontMatrix, getFontWidthFromAFMFile, getLastChar, getStringFromArray, getStringWidth, getSubType, getToUnicodeCMap, getType, getWidths, hashCode, hasToUnicode, isSymbolicFont, isType0Font, isType1Font, isType3Font, parseCmap, setBaseFont, setEncoding, setFirstChar, setFontDescriptor, setFontEncoding, setHasToUnicode, setLastChar, setWidthsdetermineEncoding, drawString, getSpaceWidth, getToUnicode, isFontSubstituted, setIsFontSubstituted, setToUnicode, writeFontpublic PDType0Font()
public PDType0Font(COSDictionary fontDictionary)
fontDictionary - The font dictionary according to the PDF
specification.public java.awt.Font getawtFont()
throws java.io.IOException
getawtFont in class PDSimpleFontjava.io.IOException - if something went wrong.public PDRectangle getFontBoundingBox() throws java.io.IOException
getFontBoundingBox in class PDSimpleFontjava.io.IOException - If there is an error getting the bounding box.public float getFontWidth(byte[] c,
int offset,
int length)
throws java.io.IOException
getFontWidth in class PDSimpleFontc - The character code to get the width for.offset - The offset into the array.length - The length of the data.java.io.IOException - If an error occurs while parsing.public float getFontHeight(byte[] c,
int offset,
int length)
throws java.io.IOException
getFontHeight in class PDSimpleFontc - The character code to get the height for.offset - The offset into the array.length - The length of the data.java.io.IOException - If an error occurs while parsing.public float getAverageFontWidth()
throws java.io.IOException
getAverageFontWidth in class PDSimpleFontjava.io.IOException - If an error occurs while parsing.public float getFontWidth(int charCode)
getFontWidth in class PDFontcharCode - the code of the given characterpublic java.lang.String encode(byte[] c,
int offset,
int length)
throws java.io.IOException
PDFontpublic PDFont getDescendantFont()