com.sun.pdfview.font

## Class Type1CFont

- java.lang.Object
- - com.sun.pdfview.font.PDFFont
  - - com.sun.pdfview.font.OutlineFont
    - - com.sun.pdfview.font.Type1CFont

    public class Type1CFont
    extends OutlineFont

A representation, with parser, of an Adobe Type 1C font.

### Constructor Summary

Constructors
Constructor and Description
`Type1CFont(java.lang.String baseFont, PDFObject src, PDFFontDescriptor descriptor)` create a new Type1CFont based on a font data stream and a descriptor

### Method Summary

Methods
`int` `calcoffset(int base)` calculate an offset code for a dictionary.
`int` `getIndexSize(int loc)` get the size of the dictionary located within the stream at some offset.
`protected java.awt.geom.GeneralPath` `getOutline(char src, float width)` Get a glyph outline by character code Note this method must always return an outline
`protected java.awt.geom.GeneralPath` `getOutline(java.lang.String name, float width)` Get a glyph outline by name
`java.lang.String` `getSID(int id)` get the name associated with an ID.
`int` `getTableLength(int loc)` return the number of entries in an Index table.
`void` `readFNum()` read the next funky floating point number from the input stream.

### Methods inherited from class com.sun.pdfview.font.OutlineFont

`getCharCount, getDefaultWidth, getFirstChar, getGlyph, getLastChar, getWidth`

### Methods inherited from class com.sun.pdfview.font.PDFFont

`equals, getBaseFont, getCachedGlyph, getDescriptor, getEncoding, getFont, getGlyphs, getSubtype, getUnicodeMap, hashCode, setBaseFont, setDescriptor, setEncoding, setSubtype, setUnicodeMap, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### Type1CFont

    public Type1CFont(java.lang.String baseFont,
              PDFObject src,
              PDFFontDescriptor descriptor)
               throws java.io.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:
  `java.io.IOException`

### Method Detail

#### 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` -
Returns:

#### 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

#### getSID

    public java.lang.String getSID(int id)

get the name associated with an ID.

Parameters:
  `id` - the index of the name
Returns:
  the name from the FontSupport.stdNames table augmented by the local name table

#### getOutline

    protected java.awt.geom.GeneralPath getOutline(java.lang.String name,
                                       float width)

Get a glyph outline by name

Specified by:
  `getOutline` in class `OutlineFont`
Parameters:
  `name` - the name of the desired glyph
Returns:
  the glyph outline, or null if unavailable

#### getOutline

    protected java.awt.geom.GeneralPath getOutline(char src,
                                       float width)

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
Returns:
  the glyph outline