Package com.itextpdf.io.font
Class CFFFont
- java.lang.Object
-
- com.itextpdf.io.font.CFFFont
-
- Direct Known Subclasses:
CFFFontSubset
public class CFFFont extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classCFFFont.DictNumberItemA dictionary number on the list.protected static classCFFFont.DictOffsetIteman unknown offset in a dictionary for the list.protected classCFFFont.Fontprotected static classCFFFont.IndexBaseItemprotected static classCFFFont.IndexMarkerItemprotected static classCFFFont.IndexOffsetItemAn index-offset item for the list.protected static classCFFFont.ItemList items for the linked list that builds the new CID font.protected static classCFFFont.MarkerItemAn offset-marker item for the list.protected static classCFFFont.OffsetItemprotected static classCFFFont.RangeItemA range item.protected static classCFFFont.StringItemprotected static classCFFFont.SubrMarkerItemprotected static classCFFFont.UInt16ItemA SID or Card16 item.protected static classCFFFont.UInt24ItemCard24 item.protected static classCFFFont.UInt32ItemCard32 item.protected static classCFFFont.UInt8ItemA Card8 item.
-
Field Summary
Fields Modifier and Type Field Description protected intarg_countprotected java.lang.Object[]argsprotected RandomAccessFileOrArraybufA random Access File or an arrayprotected CFFFont.Font[]fontsprotected intgsubrIndexOffsetprotected int[]gsubrOffsetsprotected java.lang.Stringkeyprotected intnameIndexOffsetprotected int[]nameOffsetsprivate intoffSize(package private) static java.lang.String[]operatorNames(package private) RandomAccessSourceFactoryrasFactory(package private) static java.lang.String[]standardStringsprotected intstringIndexOffsetprotected int[]stringOffsetsprotected inttopdictIndexOffsetprotected int[]topdictOffsets
-
Constructor Summary
Constructors Constructor Description CFFFont(byte[] cff)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanexists(java.lang.String fontName)(package private) chargetCard16()(package private) chargetCard8()byte[]getCID(java.lang.String fontName)get a single CID font.protected voidgetDictItem()protected CFFFont.RangeItemgetEntireIndexRange(int indexOffset)a utility that creates a range item for an entire index(package private) int[]getIndex(int nextIndexOffset)(package private) intgetInt()java.lang.String[]getNames()(package private) intgetOffset(int offSize)(package private) intgetPosition()(package private) shortgetShort()java.lang.StringgetString(char sid)booleanisCID()booleanisCID(java.lang.String fontName)(package private) voidReadEncoding(int nextIndexOffset)(package private) voidseek(int offset)
-
-
-
Field Detail
-
operatorNames
static final java.lang.String[] operatorNames
-
standardStrings
static final java.lang.String[] standardStrings
-
key
protected java.lang.String key
-
args
protected java.lang.Object[] args
-
arg_count
protected int arg_count
-
buf
protected RandomAccessFileOrArray buf
A random Access File or an array
-
offSize
private final int offSize
-
nameIndexOffset
protected int nameIndexOffset
-
topdictIndexOffset
protected int topdictIndexOffset
-
stringIndexOffset
protected int stringIndexOffset
-
gsubrIndexOffset
protected int gsubrIndexOffset
-
nameOffsets
protected int[] nameOffsets
-
topdictOffsets
protected int[] topdictOffsets
-
stringOffsets
protected int[] stringOffsets
-
gsubrOffsets
protected int[] gsubrOffsets
-
fonts
protected CFFFont.Font[] fonts
-
rasFactory
RandomAccessSourceFactory rasFactory
-
-
Method Detail
-
getString
public java.lang.String getString(char sid)
-
getCard8
char getCard8()
-
getCard16
char getCard16()
-
getOffset
int getOffset(int offSize)
-
seek
void seek(int offset)
-
getShort
short getShort()
-
getInt
int getInt()
-
getPosition
int getPosition()
-
getIndex
int[] getIndex(int nextIndexOffset)
-
getDictItem
protected void getDictItem()
-
getEntireIndexRange
protected CFFFont.RangeItem getEntireIndexRange(int indexOffset)
a utility that creates a range item for an entire index- Parameters:
indexOffset- where the index is- Returns:
- a range item representing the entire index
-
getCID
public byte[] getCID(java.lang.String fontName)
get a single CID font. The PDF architecture (1.4) supports 16-bit strings only with CID CFF fonts, not in Type-1 CFF fonts, so we convert the font to CID if it is in the Type-1 format. Two other tasks that we need to do are to select only a single font from the CFF package (this again is a PDF restriction) and to subset the CharStrings glyph description.- Parameters:
fontName- name of the font- Returns:
- byte array represents the CID font
-
isCID
public boolean isCID()
-
isCID
public boolean isCID(java.lang.String fontName)
-
exists
public boolean exists(java.lang.String fontName)
-
getNames
public java.lang.String[] getNames()
-
ReadEncoding
void ReadEncoding(int nextIndexOffset)
-
-