Class CFFFont

java.lang.Object
com.lowagie.text.pdf.CFFFont
Direct Known Subclasses:
CFFFontSubset

public class CFFFont extends Object
  • Field Details

    • operatorNames

      static final String[] operatorNames
    • standardStrings

      static final String[] standardStrings
    • offSize

      private final int offSize
    • key

      protected String key
    • args

      protected Object[] args
    • arg_count

      protected int arg_count
    • buf

      protected RandomAccessFileOrArray buf
      A random Access File or an array
    • 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
    • nextIndexOffset

      int nextIndexOffset
  • Constructor Details

  • Method Details

    • 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

      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(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
    • isCID

      public boolean isCID(String fontName)
    • exists

      public boolean exists(String fontName)
    • getNames

      public String[] getNames()