public class PDType1CFont extends PDSimpleFont
cmap, cmapObjects, font, fontMatrix, resourceRootCMAP, toUnicodeCmap| Constructor and Description |
|---|
PDType1CFont(COSDictionary fontDictionary)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
encodeToCID(byte[] bytes,
int offset,
int length) |
float |
getAverageFontWidth()
This will get the average font width for all characters.
|
java.awt.Font |
getawtFont()
Looks up, creates, returns the AWT Font.
|
PDRectangle |
getFontBoundingBox()
This will get the fonts bounding box.
|
float |
getFontHeight(byte[] bytes,
int offset,
int length)
This will get the font height for a character.
|
PDMatrix |
getFontMatrix()
This will get the matrix that is used to transform glyph space to
text space.
|
float |
getFontWidth(byte[] bytes,
int offset,
int length)
This will get the font width for a character.
|
float |
getStringWidth(java.lang.String string)
This will get the width of this string for this font.
|
determineEncoding, drawString, getSpaceWidth, getToUnicode, isFontSubstituted, setIsFontSubstituted, setToUnicode, writeFontclearResources, cmapEncoding, drawString, encode, equals, getAFM, getAverageFontWidthFromAFMFile, getBaseFont, getCodeFromArray, getCOSObject, getEncoding, getFirstChar, getFontDescriptor, getFontEncoding, getFontWidth, getFontWidthFromAFMFile, getLastChar, getSubType, getToUnicodeCMap, getType, getWidths, hashCode, hasToUnicode, isSymbolicFont, isType0Font, isType1Font, isType3Font, parseCmap, setBaseFont, setEncoding, setFirstChar, setFontDescriptor, setFontEncoding, setHasToUnicode, setLastChar, setWidthspublic PDType1CFont(COSDictionary fontDictionary) throws java.io.IOException
fontDictionary - the corresponding dictionaryjava.io.IOExceptionpublic int encodeToCID(byte[] bytes,
int offset,
int length)
encodeToCID in class PDFontpublic float getFontWidth(byte[] bytes,
int offset,
int length)
throws java.io.IOException
getFontWidth in class PDSimpleFontbytes - 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[] bytes,
int offset,
int length)
throws java.io.IOException
getFontHeight in class PDSimpleFontbytes - 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 getStringWidth(java.lang.String string)
throws java.io.IOException
getStringWidth in class PDFontstring - The string to get the width of.java.io.IOException - If there is an error getting the width information.public float getAverageFontWidth()
throws java.io.IOException
getAverageFontWidth in class PDSimpleFontjava.io.IOException - If an error occurs while parsing.public PDRectangle getFontBoundingBox() throws java.io.IOException
getFontBoundingBox in class PDSimpleFontjava.io.IOException - If there is an error getting the bounding box.public PDMatrix getFontMatrix()
getFontMatrix in class PDFontpublic java.awt.Font getawtFont()
throws java.io.IOException
getawtFont in class PDSimpleFontjava.io.IOException - if something went wrong.