|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pdfbox.pdmodel.font.PDFont
org.apache.pdfbox.pdmodel.font.PDSimpleFont
org.apache.pdfbox.pdmodel.font.PDType1CFont
public class PDType1CFont
This class represents a CFF/Type2 Font (aka Type1C Font).
| Field Summary |
|---|
| Fields inherited from class org.apache.pdfbox.pdmodel.font.PDFont |
|---|
cmap, cmapObjects, font, fontMatrix, resourceRootCMAP, toUnicodeCmap |
| Constructor Summary | |
|---|---|
PDType1CFont(COSDictionary fontDictionary)
Constructor. |
|
| Method Summary | |
|---|---|
void |
clear()
Calling this will release all cached information. |
String |
encode(byte[] bytes,
int offset,
int length)
This will perform the encoding of a character if needed. |
int |
encodeToCID(byte[] bytes,
int offset,
int length)
|
float |
getAverageFontWidth()
This will get the average font width for all characters. |
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(String string)
This will get the width of this string for this font. |
| Methods inherited from class org.apache.pdfbox.pdmodel.font.PDSimpleFont |
|---|
determineEncoding, drawString, getSpaceWidth, getToUnicode, isFontSubstituted, setIsFontSubstituted, setToUnicode, writeFont |
| Methods inherited from class org.apache.pdfbox.pdmodel.font.PDFont |
|---|
clearResources, cmapEncoding, drawString, equals, getAFM, getAverageFontWidthFromAFMFile, getBaseFont, getCodeFromArray, getCOSObject, getEncoding, getFirstChar, getFontDescriptor, getFontEncoding, getFontWidth, getFontWidthFromAFMFile, getLastChar, getStringFromArray, getSubType, getToUnicodeCMap, getType, getWidths, hashCode, hasToUnicode, isSymbolicFont, isType0Font, isType1Font, isType3Font, parseCmap, setBaseFont, setEncoding, setFirstChar, setFontDescriptor, setFontEncoding, setHasToUnicode, setLastChar, setWidths |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PDType1CFont(COSDictionary fontDictionary)
throws IOException
fontDictionary - the corresponding dictionary
IOException| Method Detail |
|---|
public String encode(byte[] bytes,
int offset,
int length)
throws IOException
encode in class PDFontbytes - The character to encode.offset - The offset into the array to get the datalength - The number of bytes to read.
IOException - If there is an error during the encoding.
public int encodeToCID(byte[] bytes,
int offset,
int length)
encodeToCID in class PDFont
public float getFontWidth(byte[] bytes,
int offset,
int length)
throws 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.
IOException - If an error occurs while parsing.
public float getFontHeight(byte[] bytes,
int offset,
int length)
throws 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.
IOException - If an error occurs while parsing.
public float getStringWidth(String string)
throws IOException
getStringWidth in class PDFontstring - The string to get the width of.
IOException - If there is an error getting the width information.
public float getAverageFontWidth()
throws IOException
getAverageFontWidth in class PDSimpleFontIOException - If an error occurs while parsing.
public PDRectangle getFontBoundingBox()
throws IOException
getFontBoundingBox in class PDSimpleFontIOException - If there is an error getting the bounding box.public PDMatrix getFontMatrix()
getFontMatrix in class PDFont
public Font getawtFont()
throws IOException
getawtFont in class PDSimpleFontIOException - if something went wrong.public void clear()
PDFont
clear in class PDFont
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||