com.lowagie.text.pdf
Class CFFFont

java.lang.Object
  extended bycom.lowagie.text.pdf.CFFFont

public class CFFFont
extends Object


Nested Class Summary
private static class CFFFont.DictNumberItem
          A dictionary number on the list.
private static class CFFFont.DictOffsetItem
          an unknown offset in a dictionary for the list.
private  class CFFFont.Font
           
private static class CFFFont.IndexBaseItem
           
private static class CFFFont.IndexMarkerItem
           
private static class CFFFont.IndexOffsetItem
          an index-offset item for the list.
private static class CFFFont.Item
          List items for the linked list that builds the new CID font.
private static class CFFFont.MarkerItem
          An offset-marker item for the list.
private static class CFFFont.OffsetItem
           
private static class CFFFont.RangeItem
          A range item.
private static class CFFFont.StringItem
           
private static class CFFFont.UInt16Item
          A SID or Card16 item.
private static class CFFFont.UInt8Item
          A Card8 item.
 
Field Summary
private  int arg_count
           
private  Object[] args
           
private  RandomAccessFileOrArray buf
           
private  CFFFont.Font[] fonts
           
private  int gsubrIndexOffset
           
private  int[] gsubrOffsets
           
private  String key
           
private  int nameIndexOffset
           
private  int[] nameOffsets
           
(package private)  int nextIndexOffset
           
private  int offSize
           
(package private) static String[] operatorNames
           
(package private) static String[] standardStrings
           
private  int stringIndexOffset
           
private  int[] stringOffsets
           
private  int topdictIndexOffset
           
private  int[] topdictOffsets
           
 
Constructor Summary
CFFFont(RandomAccessFileOrArray inputbuffer)
           
 
Method Summary
 boolean exists(String fontName)
           
(package private)  char getCard16()
           
(package private)  char getCard8()
           
 byte[] getCID(String fontName)
          get a single CID font.
private  void getDictItem()
           
private  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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operatorNames

static final String[] operatorNames

standardStrings

static final String[] standardStrings

nextIndexOffset

int nextIndexOffset

key

private String key

args

private Object[] args

arg_count

private int arg_count

buf

private RandomAccessFileOrArray buf

offSize

private int offSize

nameIndexOffset

private int nameIndexOffset

topdictIndexOffset

private int topdictIndexOffset

stringIndexOffset

private int stringIndexOffset

gsubrIndexOffset

private int gsubrIndexOffset

nameOffsets

private int[] nameOffsets

topdictOffsets

private int[] topdictOffsets

stringOffsets

private int[] stringOffsets

gsubrOffsets

private int[] gsubrOffsets

fonts

private CFFFont.Font[] fonts
Constructor Detail

CFFFont

public CFFFont(RandomAccessFileOrArray inputbuffer)
Method Detail

getString

public 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

private void getDictItem()

getEntireIndexRange

private 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(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.


isCID

public boolean isCID(String fontName)

exists

public boolean exists(String fontName)

getNames

public String[] getNames()