|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.pdfbox.pdmodel.font.PDFont
org.pdfbox.pdmodel.font.PDCIDFont
This is implementation for the CIDFontType0/CIDFontType2 Fonts.
| Field Summary |
| Fields inherited from class org.pdfbox.pdmodel.font.PDFont |
font |
| Constructor Summary | |
PDCIDFont()
Constructor. |
|
PDCIDFont(COSDictionary fontDictionary)
Constructor. |
|
| Method Summary | |
void |
drawString(String string,
Graphics g,
float fontSize,
float xScale,
float yScale,
float x,
float y)
This will draw a string on a canvas using the font. |
float |
getAverageFontWidth()
This will get the average font width for all characters. |
long |
getDefaultWidth()
This will get the default width. |
PDRectangle |
getFontBoundingBox()
This will get the fonts bouding box. |
PDFontDescriptor |
getFontDescriptor()
Get the font descriptor associated with this CID font. |
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. |
void |
setDefaultWidth(long dw)
This will set the default width for the glyphs of this font. |
void |
setFontDescriptor(PDFontDescriptorDictionary desc)
Set the font descriptor associated with this CID Font. |
| Methods inherited from class org.pdfbox.pdmodel.font.PDFont |
clearResources, encode, equals, getAFM, getAverageFontWidthFromAFMFile, getBaseFont, getCodeFromArray, getCOSObject, getEncoding, getFirstChar, getFontMatrix, getFontWidthFromAFMFile, getLastChar, getStringWidth, getSubType, getType, getWidths, hashCode, setBaseFont, setEncoding, setFirstChar, setLastChar, setWidths |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PDCIDFont()
public PDCIDFont(COSDictionary fontDictionary)
fontDictionary - The font dictionary according to the PDF specification.| Method Detail |
public PDFontDescriptor getFontDescriptor()
public void setFontDescriptor(PDFontDescriptorDictionary desc)
desc - The font descriptor.
public void drawString(String string,
Graphics g,
float fontSize,
float xScale,
float yScale,
float x,
float y)
drawString in class PDFontstring - The string to draw.g - The graphics to draw onto.fontSize - The size of the font to draw.xScale - The x scaling percent.yScale - The y scaling percent.x - The x coordinate to draw at.y - The y coordinate to draw at.
public PDRectangle getFontBoundingBox()
throws IOException
getFontBoundingBox in class PDFontIOException - If there is an error getting the font bounding box.public long getDefaultWidth()
public void setDefaultWidth(long dw)
dw - The default width.
public float getFontWidth(byte[] c,
int offset,
int length)
throws IOException
getFontWidth in class PDFontc - 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[] c,
int offset,
int length)
throws IOException
getFontHeight in class PDFontc - The character code to get the height for.offset - The offset into the array.length - The length of the data.
IOException - If an error occurs while parsing.
public float getAverageFontWidth()
throws IOException
getAverageFontWidth in class PDFontIOException - If an error occurs while parsing.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||