| java.lang.Object org.pdfbox.pdmodel.font.PDFont org.pdfbox.pdmodel.font.PDSimpleFont org.pdfbox.pdmodel.font.PDTrueTypeFont
PDTrueTypeFont | public class PDTrueTypeFont extends PDSimpleFont (Code) | | This is the TrueType implementation of fonts.
author: Ben Litchfield version: $Revision: 1.17 $ |
Field Summary | |
final public 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. |
Method Summary | |
public void | drawString(String string, Graphics g, float fontSize, float xScale, float yScale, float x, float y) | public static PDTrueTypeFont | loadTTF(PDDocument doc, String file) This will load a TTF font from a font file.
Parameters: doc - The PDF document that will hold the embedded font. Parameters: file - The file on the filesystem that holds the font file. | public static PDTrueTypeFont | loadTTF(PDDocument doc, File file) This will load a TTF to be embedding into a document.
Parameters: doc - The PDF document that will hold the embedded font. |
UNKNOWN_FONT | final public static String UNKNOWN_FONT(Code) | | 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.
|
PDTrueTypeFont | public PDTrueTypeFont()(Code) | | Constructor.
|
PDTrueTypeFont | public PDTrueTypeFont(COSDictionary fontDictionary)(Code) | | Constructor.
Parameters: fontDictionary - The font dictionary according to the PDF specification. |
loadTTF | public static PDTrueTypeFont loadTTF(PDDocument doc, String file) throws IOException(Code) | | This will load a TTF font from a font file.
Parameters: doc - The PDF document that will hold the embedded font. Parameters: file - The file on the filesystem that holds the font file. A true type font. throws: IOException - If there is an error loading the file data. |
loadTTF | public static PDTrueTypeFont loadTTF(PDDocument doc, File file) throws IOException(Code) | | This will load a TTF to be embedding into a document.
Parameters: doc - The PDF document that will hold the embedded font. Parameters: file - A TTF file stream. A PDF TTF. throws: IOException - If there is an error loading the data. |
Methods inherited from org.pdfbox.pdmodel.font.PDSimpleFont | public void drawString(String string, Graphics g, float fontSize, float xScale, float yScale, float x, float y) throws IOException(Code)(Java Doc) public float getAverageFontWidth() throws IOException(Code)(Java Doc) public PDRectangle getFontBoundingBox() throws IOException(Code)(Java Doc) public PDFontDescriptor getFontDescriptor() throws IOException(Code)(Java Doc) public float getFontHeight(byte[] c, int offset, int length) throws IOException(Code)(Java Doc) public float getFontWidth(byte[] c, int offset, int length) throws IOException(Code)(Java Doc) public PDStream getToUnicode() throws IOException(Code)(Java Doc) public void setFontDescriptor(PDFontDescriptorDictionary fontDescriptor)(Code)(Java Doc) public void setToUnicode(PDStream unicode)(Code)(Java Doc)
|
Methods inherited from org.pdfbox.pdmodel.font.PDFont | public static void clearResources()(Code)(Java Doc) abstract public void drawString(String string, Graphics g, float fontSize, float xScale, float yScale, float x, float y) throws IOException(Code)(Java Doc) public String encode(byte[] c, int offset, int length) throws IOException(Code)(Java Doc) public boolean equals(Object other)(Code)(Java Doc) protected FontMetric getAFM() throws IOException(Code)(Java Doc) abstract public float getAverageFontWidth() throws IOException(Code)(Java Doc) protected float getAverageFontWidthFromAFMFile() throws IOException(Code)(Java Doc) public String getBaseFont()(Code)(Java Doc) public COSBase getCOSObject()(Code)(Java Doc) protected int getCodeFromArray(byte[] data, int offset, int length)(Code)(Java Doc) public Encoding getEncoding() throws IOException(Code)(Java Doc) public int getFirstChar()(Code)(Java Doc) abstract public PDRectangle getFontBoundingBox() throws IOException(Code)(Java Doc) abstract public float getFontHeight(byte[] c, int offset, int length) throws IOException(Code)(Java Doc) public PDMatrix getFontMatrix()(Code)(Java Doc) abstract public float getFontWidth(byte[] c, int offset, int length) throws IOException(Code)(Java Doc) protected float getFontWidthFromAFMFile(int code) throws IOException(Code)(Java Doc) public int getLastChar()(Code)(Java Doc) public float getStringWidth(String string) throws IOException(Code)(Java Doc) public String getSubType()(Code)(Java Doc) public String getType()(Code)(Java Doc) public List getWidths()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public void setBaseFont(String baseFont)(Code)(Java Doc) public void setEncoding(Encoding enc)(Code)(Java Doc) public void setFirstChar(int firstChar)(Code)(Java Doc) public void setLastChar(int lastChar)(Code)(Java Doc) public void setWidths(List widths)(Code)(Java Doc)
|
|
|