|
||||||||||
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.PDType1Font
public class PDType1Font
This is implementation of the Type1 Font.
Field Summary | |
---|---|
static PDType1Font |
COURIER
Standard Base 14 Font. |
static PDType1Font |
COURIER_BOLD
Standard Base 14 Font. |
static PDType1Font |
COURIER_BOLD_OBLIQUE
Standard Base 14 Font. |
static PDType1Font |
COURIER_OBLIQUE
Standard Base 14 Font. |
static PDType1Font |
HELVETICA
Standard Base 14 Font. |
static PDType1Font |
HELVETICA_BOLD
Standard Base 14 Font. |
static PDType1Font |
HELVETICA_BOLD_OBLIQUE
Standard Base 14 Font. |
static PDType1Font |
HELVETICA_OBLIQUE
Standard Base 14 Font. |
static PDType1Font |
SYMBOL
Standard Base 14 Font. |
static PDType1Font |
TIMES_BOLD
Standard Base 14 Font. |
static PDType1Font |
TIMES_BOLD_ITALIC
Standard Base 14 Font. |
static PDType1Font |
TIMES_ITALIC
Standard Base 14 Font. |
static PDType1Font |
TIMES_ROMAN
Standard Base 14 Font. |
static PDType1Font |
ZAPF_DINGBATS
Standard Base 14 Font. |
Fields inherited from class org.apache.pdfbox.pdmodel.font.PDFont |
---|
cmap, cmapObjects, font, fontMatrix, resourceRootCMAP, toUnicodeCmap |
Constructor Summary | |
---|---|
PDType1Font()
Constructor. |
|
PDType1Font(COSDictionary fontDictionary)
Constructor. |
|
PDType1Font(String baseFont)
Constructor. |
Method Summary | |
---|---|
protected void |
determineEncoding()
Determines the encoding for the font. |
String |
encode(byte[] c,
int offset,
int length)
This will perform the encoding of a character if needed. |
int |
encodeToCID(byte[] c,
int offset,
int length)
|
Font |
getawtFont()
Looks up, creates, returns the AWT Font. |
PDMatrix |
getFontMatrix()
This will get the matrix that is used to transform glyph space to text space. |
static String[] |
getStandard14Names()
This will get the names of the standard 14 fonts. |
static PDType1Font |
getStandardFont(String name)
A convenience method to get one of the standard 14 font from name. |
Methods inherited from class org.apache.pdfbox.pdmodel.font.PDSimpleFont |
---|
drawString, getAverageFontWidth, getFontBoundingBox, getFontHeight, getFontWidth, 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, getStringWidth, getSubType, getType, getWidths, hashCode, hasToUnicode, isType0Font, isType1Font, 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 |
Field Detail |
---|
public static final PDType1Font TIMES_ROMAN
public static final PDType1Font TIMES_BOLD
public static final PDType1Font TIMES_ITALIC
public static final PDType1Font TIMES_BOLD_ITALIC
public static final PDType1Font HELVETICA
public static final PDType1Font HELVETICA_BOLD
public static final PDType1Font HELVETICA_OBLIQUE
public static final PDType1Font HELVETICA_BOLD_OBLIQUE
public static final PDType1Font COURIER
public static final PDType1Font COURIER_BOLD
public static final PDType1Font COURIER_OBLIQUE
public static final PDType1Font COURIER_BOLD_OBLIQUE
public static final PDType1Font SYMBOL
public static final PDType1Font ZAPF_DINGBATS
Constructor Detail |
---|
public PDType1Font()
public PDType1Font(COSDictionary fontDictionary)
fontDictionary
- The font dictionary according to the PDF specification.public PDType1Font(String baseFont)
baseFont
- The base font for this font.Method Detail |
---|
public static PDType1Font getStandardFont(String name)
name
- The name of the font to get.
public static String[] getStandard14Names()
public Font getawtFont() throws IOException
getawtFont
in class PDSimpleFont
IOException
- if something went wrong.protected void determineEncoding()
PDSimpleFont
determineEncoding
in class PDSimpleFont
public String encode(byte[] c, int offset, int length) throws IOException
encode
in class PDFont
c
- 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[] c, int offset, int length) throws IOException
encodeToCID
in class PDFont
IOException
public PDMatrix getFontMatrix()
getFontMatrix
in class PDFont
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |