|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.itextpdf.text.pdf.BaseFont com.itextpdf.text.pdf.DocumentFont com.itextpdf.text.pdf.CMapAwareDocumentFont
public class CMapAwareDocumentFont
Implementation of DocumentFont used while parsing PDF streams.
Field Summary |
---|
Fields inherited from class com.itextpdf.text.pdf.DocumentFont |
---|
cjkEncoding, isType0, uniMap |
Constructor Summary | |
---|---|
CMapAwareDocumentFont(PdfDictionary font)
|
|
CMapAwareDocumentFont(PRIndirectReference refFont)
Creates an instance of a CMapAwareFont based on an indirect reference to a font. |
Method Summary | |
---|---|
String |
decode(byte[] cidbytes,
int offset,
int len)
Decodes a string of bytes (encoded in the font's encoding) into a unicode string This will use the ToUnicode map of the font, if available, otherwise it uses the font's encoding |
String |
encode(byte[] bytes,
int offset,
int len)
Deprecated. method name is not indicative of what it does. Use decode instead. |
int |
getWidth(int char1)
Gets the width of a char in normalized 1000 units. |
Methods inherited from class com.itextpdf.text.pdf.DocumentFont |
---|
charExists, convertToBytes, getAllNameEntries, getCharBBox, getFamilyFontName, getFontDescriptor, getFontDictionary, getFullFontName, getFullFontStream, getKerning, getPostscriptFontName, getRawCharBBox, getWidth, hasKernPairs, isVertical, setKerning, setPostscriptFontName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CMapAwareDocumentFont(PdfDictionary font)
public CMapAwareDocumentFont(PRIndirectReference refFont)
refFont
- the indirect reference to a fontMethod Detail |
---|
public int getWidth(int char1)
DocumentFont
char
in normalized 1000 units.
getWidth
in class DocumentFont
char1
- the unicode char
to get the width of
DocumentFont.getWidth(int)
public String decode(byte[] cidbytes, int offset, int len)
cidbytes
- the bytes that need to be decoded
public String encode(byte[] bytes, int offset, int len)
decode
instead.
bytes
- the bytes from a streamoffset
- an offsetlen
- a length
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |