|
||||||||||
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.PDCIDFont
public abstract class PDCIDFont
This is implementation for the CIDFontType0/CIDFontType2 Fonts.
Field Summary |
---|
Fields inherited from class org.apache.pdfbox.pdmodel.font.PDFont |
---|
cmap, cmapObjects, font, fontMatrix, resourceRootCMAP |
Constructor Summary | |
---|---|
PDCIDFont()
Constructor. |
|
PDCIDFont(COSDictionary fontDictionary)
Constructor. |
Method Summary | |
---|---|
protected void |
determineEncoding()
Determines the encoding for the font. |
java.lang.String |
encode(byte[] c,
int offset,
int length)
This will perform the encoding of a character if needed. |
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. |
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. |
float |
getFontWidth(int charCode)
Determines the width of the given character. |
void |
setDefaultWidth(long dw)
This will set the default width for the glyphs of this font. |
Methods inherited from class org.apache.pdfbox.pdmodel.font.PDSimpleFont |
---|
drawString, getawtFont, getToUnicode, setToUnicode, writeFont |
Methods inherited from class org.apache.pdfbox.pdmodel.font.PDFont |
---|
clearResources, cmapEncoding, createString, equals, getAFM, getAverageFontWidthFromAFMFile, getBaseFont, getCodeFromArray, getCOSObject, getEncoding, getFirstChar, getFontDescriptor, getFontEncoding, getFontMatrix, getFontWidthFromAFMFile, getLastChar, getStringWidth, getSubType, getType, getWidths, hashCode, hasToUnicode, 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 |
Constructor Detail |
---|
public PDCIDFont()
public PDCIDFont(COSDictionary fontDictionary)
fontDictionary
- The font dictionary according to the PDF specification.Method Detail |
---|
public PDRectangle getFontBoundingBox() throws java.io.IOException
getFontBoundingBox
in class PDSimpleFont
java.io.IOException
- 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 java.io.IOException
getFontWidth
in class PDSimpleFont
c
- The character code to get the width for.offset
- The offset into the array.length
- The length of the data.
java.io.IOException
- If an error occurs while parsing.public float getFontHeight(byte[] c, int offset, int length) throws java.io.IOException
getFontHeight
in class PDSimpleFont
c
- The character code to get the height for.offset
- The offset into the array.length
- The length of the data.
java.io.IOException
- If an error occurs while parsing.public float getAverageFontWidth() throws java.io.IOException
getAverageFontWidth
in class PDSimpleFont
java.io.IOException
- If an error occurs while parsing.public float getFontWidth(int charCode)
getFontWidth
in class PDFont
charCode
- the code of the given character
protected void determineEncoding()
PDSimpleFont
determineEncoding
in class PDSimpleFont
public java.lang.String encode(byte[] c, int offset, int length) throws java.io.IOException
PDFont
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.
java.io.IOException
- If there is an error during the encoding.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |