com.lowagie.text.pdf

Class CFFFont

Known Direct Subclasses:
CFFFontSubset

public class CFFFont
extends java.lang.Object

Author:
stoledo

Nested Class Summary

protected static class
CFFFont.DictNumberItem
A dictionary number on the list.
protected static class
CFFFont.DictOffsetItem
an unknown offset in a dictionary for the list.
protected class
CFFFont.Font
protected static class
CFFFont.IndexBaseItem
protected static class
CFFFont.IndexMarkerItem
protected static class
CFFFont.IndexOffsetItem
An index-offset item for the list.
protected static class
CFFFont.Item
List items for the linked list that builds the new CID font.
protected static class
CFFFont.MarkerItem
An offset-marker item for the list.
protected static class
CFFFont.OffsetItem
protected static class
CFFFont.RangeItem
A range item.
protected static class
CFFFont.StringItem
protected static class
CFFFont.SubrMarkerItem
protected static class
CFFFont.UInt16Item
A SID or Card16 item.
protected static class
CFFFont.UInt24Item
Card24 item.
protected static class
CFFFont.UInt32Item
Card32 item.
protected static class
CFFFont.UInt8Item
A Card8 item.

Field Summary

protected int
arg_count
protected Object[]
args
protected RandomAccessFileOrArray
buf
A random Access File or an array (contributed by orly manor)
protected CFFFont.Font[]
fonts
protected int
gsubrIndexOffset
protected int[]
gsubrOffsets
protected String
key
protected int
nameIndexOffset
protected int[]
nameOffsets
(package private) int
nextIndexOffset
private int
offSize
(package private) static String[]
operatorNames
(package private) static String[]
standardStrings
protected int
stringIndexOffset
protected int[]
stringOffsets
protected int
topdictIndexOffset
protected int[]
topdictOffsets

Constructor Summary

CFFFont(RandomAccessFileOrArray inputbuffer)

Method Summary

(package private) void
ReadEncoding(int nextIndexOffset)
boolean
exists(String fontName)
byte[]
getCID(String fontName)
get a single CID font.
(package private) char
getCard16()
(package private) char
getCard8()
protected void
getDictItem()
protected CFFFont.RangeItem
getEntireIndexRange(int indexOffset)
a utility that creates a range item for an entire index
(package private) int[]
getIndex(int nextIndexOffset)
(package private) int
getInt()
String[]
getNames()
(package private) int
getOffset(int offSize)
(package private) int
getPosition()
(package private) short
getShort()
String
getString(char sid)
boolean
isCID(String fontName)
(package private) void
seek(int offset)

Field Details

arg_count

protected int arg_count

args

protected Object[] args

buf

protected RandomAccessFileOrArray buf
A random Access File or an array (contributed by orly manor)

fonts

protected CFFFont.Font[] fonts

gsubrIndexOffset

protected int gsubrIndexOffset

gsubrOffsets

protected int[] gsubrOffsets

key

protected String key

nameIndexOffset

protected int nameIndexOffset

nameOffsets

protected int[] nameOffsets

nextIndexOffset

(package private)  int nextIndexOffset

offSize

private int offSize

operatorNames

(package private) static final String[] operatorNames

standardStrings

(package private) static final String[] standardStrings

stringIndexOffset

protected int stringIndexOffset

stringOffsets

protected int[] stringOffsets

topdictIndexOffset

protected int topdictIndexOffset

topdictOffsets

protected int[] topdictOffsets

Constructor Details

CFFFont

public CFFFont(RandomAccessFileOrArray inputbuffer)

Method Details

ReadEncoding

(package private)  void ReadEncoding(int nextIndexOffset)

exists

public boolean exists(String fontName)

getCID

public byte[] getCID(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.

getCard16

(package private)  char getCard16()

getCard8

(package private)  char getCard8()

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

getIndex

(package private)  int[] getIndex(int nextIndexOffset)

getInt

(package private)  int getInt()

getNames

public String[] getNames()

getOffset

(package private)  int getOffset(int offSize)

getPosition

(package private)  int getPosition()

getShort

(package private)  short getShort()

getString

public String getString(char sid)

isCID

public boolean isCID(String fontName)

seek

(package private)  void seek(int offset)