com.sun.pdfview.font

Class Type1CFont

public class Type1CFont extends OutlineFont

A representation, with parser, of an Adobe Type 1C font.
Constructor Summary
Type1CFont(String baseFont, PDFObject src, PDFFontDescriptor descriptor)
create a new Type1CFont based on a font data stream and a descriptor
Method Summary
intcalcoffset(int base)
calculate an offset code for a dictionary
intgetIndexSize(int loc)
get the size of the dictionary located within the stream at some offset.
protected GeneralPathgetOutline(String name, float width)
Get a glyph outline by name
protected GeneralPathgetOutline(char src, float width)
Get a glyph outline by character code Note this method must always return an outline
StringgetSID(int id)
get the name associated with an ID.
voidreadFNum()
read the next funky floating point number from the input stream. value gets put into the fnum field.

Constructor Detail

Type1CFont

public Type1CFont(String baseFont, PDFObject src, PDFFontDescriptor descriptor)
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

Method Detail

calcoffset

public int calcoffset(int base)
calculate an offset code for a dictionary

Parameters: base the index of the start of the dictionary

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.

getOutline

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

Parameters: name the name of the desired glyph

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

Parameters: src the character code of the desired glyph

Returns: the glyph outline

getSID

public 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

readFNum

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