Class Type1CFont


public class Type1CFont extends OutlineFont
A representation, with parser, of an Adobe Type 1C font. You can find information about CFF and Type 1C font encoding in ... and ... Author Mike Wessler
  • Constructor Details

    • Type1CFont

      public Type1CFont(String baseFont, PDFObject src, PDFFontDescriptor descriptor) throws IOException
      create a new Type1CFont based on a font data stream and a descriptor
      Parameters:
      baseFont - the postscript name of this font
      src - a stream containing the font
      descriptor - the descriptor for this font
      Throws:
      IOException - if any.
  • Method Details

    • readFNum

      public void readFNum()
      read the next funky floating point number from the input stream. value gets put into the fnum field.
    • getIndexSize

      public int getIndexSize(int loc)
      get the size of the dictionary located within the stream at some offset.
      Parameters:
      loc - the index of the start of the dictionary
      Returns:
      the size of the dictionary, in bytes.
    • getTableLength

      public int getTableLength(int loc)
      return the number of entries in an Index table.
      Parameters:
      loc - a Integer object.
      Returns:
      a Integer object.
    • calcoffset

      public int calcoffset(int base)
      calculate an offset code for a dictionary. Uses the count of entries to determine what the offset should be.
      Parameters:
      base - the index of the start of the dictionary
      Returns:
      a Integer object.
    • getOutline

      protected GeneralPath getOutline(String name, float width)
      Get a glyph outline by name

      Get a glyph outline by name

      Specified by:
      getOutline in class OutlineFont
      Parameters:
      name - the name of the desired glyph
      width - a float.
      Returns:
      the glyph outline, or null if unavailable
    • getOutline

      protected GeneralPath getOutline(char src, float width)
      Get a glyph outline by character code

      Note this method must always return an outline Get a glyph outline by character code Note this method must always return an outline

      Specified by:
      getOutline in class OutlineFont
      Parameters:
      src - the character code of the desired glyph
      width - a float.
      Returns:
      the glyph outline