|
|||||||||||
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.PDSimpleFont
org.pdfbox.pdmodel.font.PDTrueTypeFont
This is the TrueType implementation of fonts.
Field Summary | |
static String |
UNKNOWN_FONT
This is the key to a property in the Resources/PDFBox_External_Fonts.properties file to load a Font when a mapping does not exist for the current font. |
Fields inherited from class org.pdfbox.pdmodel.font.PDFont |
font |
Constructor Summary | |
PDTrueTypeFont()
Constructor. |
|
PDTrueTypeFont(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. |
static PDTrueTypeFont |
loadTTF(PDDocument doc,
File file)
This will load a TTF to be embedding into a document. |
static PDTrueTypeFont |
loadTTF(PDDocument doc,
String file)
This will load a TTF font from a font file. |
Methods inherited from class org.pdfbox.pdmodel.font.PDSimpleFont |
getAverageFontWidth, getFontBoundingBox, getFontDescriptor, getFontWidth, getToUnicode, setFontDescriptor, setToUnicode |
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 |
Field Detail |
public static final String UNKNOWN_FONT
Constructor Detail |
public PDTrueTypeFont()
public PDTrueTypeFont(COSDictionary fontDictionary)
fontDictionary
- The font dictionary according to the PDF specification.Method Detail |
public static PDTrueTypeFont loadTTF(PDDocument doc, String file) throws IOException
doc
- The PDF document that will hold the embedded font.file
- The file on the filesystem that holds the font file.
IOException
- If there is an error loading the file data.public static PDTrueTypeFont loadTTF(PDDocument doc, File file) throws IOException
doc
- The PDF document that will hold the embedded font.file
- A TTF file stream.
IOException
- If there is an error loading the data.public void drawString(String string, Graphics g, float fontSize, float xScale, float yScale, float x, float y) throws IOException
PDFont
drawString
in class PDSimpleFont
IOException
PDFont.drawString( String, Graphics, float, float, float, float, float )
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |