org.extex.font.format.xtf.tables.cff
Class CffFont

java.lang.Object
  extended by org.extex.font.format.xtf.tables.cff.CffFont
All Implemented Interfaces:
XMLWriterConvertible

public class CffFont
extends java.lang.Object
implements XMLWriterConvertible

Class for a CffFont.

Version:
$Revision: 6748 $
Author:
Michael Niedermair

Constructor Summary
CffFont(java.lang.String fontname, int number)
          Creates a new object.
 
Method Summary
 void addTopDictIndex(T2Operator op)
          Add an entry to the top dict index.
 int getBlueFuzz()
          Returns the BlueFuzz.
 double getBlueScale()
          Returns the BlueScale.
 int getBlueShift()
          Returns the BlueShift.
 int[] getBlueValues()
          Returns the BlueValues.
 OtfTableCFF getCff()
          Getter for cff.
 T2TDOCharset getCharset()
          Getter for charset.
 CharString getCharstring(java.lang.String name)
          Returns the CharString with the name or null, if not found.
 int getCharstringType()
          Returns the CharstringType.
 java.lang.String getCopyright()
          Getter for copyright.
 int getDefaultWidthX()
          Returns the defaultWidthX.
 java.lang.String getEncoding()
          Return the name of the encoding.
 double getExpansionFactor()
          Returns the ExpansionFactor.
 java.lang.String getFamilyName()
          Getter for familyname.
 int[] getFontBBox()
          Returns the FontBBox.
 double[] getFontMatrix()
          Returns the FontMatrix.
 int getFontNumber()
          Getter for fontnumber.
 boolean getForceBold()
          Returns the ForceBold.
 java.lang.String getFullName()
          Getter for fullname.
 int getInitialRandomSeed()
          Returns the initialRandomSeed.
 int getItalicAngle()
          Getter for italicangle.
 int getLanguageGroup()
          Returns the LanguageGroup.
 java.lang.String getName()
          Getter for name.
 java.lang.String getNameForPos(int pos)
           
 int getNominalWidthX()
          Returns the nominalWidthX.
 java.lang.String getNotice()
          Getter for notice.
 int getNumberOfGlyphs()
          Getter for numberOfGlyphs.
 int getPaintType()
          Getter for painttype.
 java.lang.String getPostscript()
          Getter for postscript.
 int getStdHW()
          Returns the StdHW.
 int getStdVW()
          Returns the StdVW.
 int[] getStemSnapH()
          Returns the StemSnapH.
 int[] getStemSnapV()
          Returns the StemSnapV.
 int getStrokewidth()
          Getter for strokewidth.
 CharString getSubrs(int idx)
          Returns the CharString (subrs) with the index or null, if not found.
 T2Operator getTopDictIndex(java.lang.String name)
          Returns the top dict index entry, if no entry found, null is returned.
 int getUnderlinePosition()
          Getter for underlineposition.
 int getUnderlineThickness()
          Getter for underlinethickness.
 java.lang.String getVersion()
          Getter for version.
 java.lang.String getWeight()
          Getter for weight.
 void init(RandomAccessR rar, OtfTableCFF cff, int baseoffset)
          Initialize the font.
 boolean isCid()
          Getter for isCID.
 boolean isFixedPitch()
          Getter for isfixedpitch.
 java.lang.String toString()
          
 void writeXML(XMLStreamWriter writer)
          Write the data to a XMLStreamWriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CffFont

public CffFont(java.lang.String fontname,
               int number)
Creates a new object.

Parameters:
fontname - The name of the font.
number - The number.
Method Detail

addTopDictIndex

public void addTopDictIndex(T2Operator op)
Add an entry to the top dict index.

Parameters:
op - The T2 operator.

getBlueFuzz

public int getBlueFuzz()
Returns the BlueFuzz. (default: 1)

Returns:
Returns the BlueFuzz.

getBlueScale

public double getBlueScale()
Returns the BlueScale. (default: 0.039625)

Returns:
Returns the BlueScale.

getBlueShift

public int getBlueShift()
Returns the BlueShift. (default: 7)

Returns:
Returns the BlueShift.

getBlueValues

public int[] getBlueValues()
Returns the BlueValues. (default: -)

Returns:
Returns the BlueValues.

getCff

public OtfTableCFF getCff()
Getter for cff.

Returns:
the cff

getCharset

public T2TDOCharset getCharset()
Getter for charset.

Returns:
Returns the charset.

getCharstring

public CharString getCharstring(java.lang.String name)
Returns the CharString with the name or null, if not found.

Parameters:
name - The name of the charstring.
Returns:
Returns the CharString with the name.

getCharstringType

public int getCharstringType()
Returns the CharstringType. (default: 2)

Returns:
Returns the CharstringType.

getCopyright

public java.lang.String getCopyright()
Getter for copyright.

Returns:
Returns the copyright.

getDefaultWidthX

public int getDefaultWidthX()
Returns the defaultWidthX. (default: 0)

Returns:
Returns the defaultWidthX.

getEncoding

public java.lang.String getEncoding()
Return the name of the encoding.

Returns:
Return the name of the encoding.

getExpansionFactor

public double getExpansionFactor()
Returns the ExpansionFactor. (default: 0.06)

Returns:
Returns the ExpansionFactor.

getFamilyName

public java.lang.String getFamilyName()
Getter for familyname.

Returns:
Returns the familyname.

getFontBBox

public int[] getFontBBox()
Returns the FontBBox. (default: 0, 0, 0, 0)

Returns:
Returns the FontBBox.

getFontMatrix

public double[] getFontMatrix()
Returns the FontMatrix. (default: 0.001 0 0 0.001 0 0)

Returns:
Returns the FontMatrix.

getFontNumber

public int getFontNumber()
Getter for fontnumber.

Returns:
Returns the fontnumber.

getForceBold

public boolean getForceBold()
Returns the ForceBold. (default: false)

Returns:
Returns the ForceBold.

getFullName

public java.lang.String getFullName()
Getter for fullname.

Returns:
Returns the fullname.

getInitialRandomSeed

public int getInitialRandomSeed()
Returns the initialRandomSeed. (default: 0)

Returns:
Returns the initialRandomSeed.

getItalicAngle

public int getItalicAngle()
Getter for italicangle.

Returns:
Returns the italicangle.

getLanguageGroup

public int getLanguageGroup()
Returns the LanguageGroup. (default: 0)

Returns:
Returns the LanguageGroup.

getName

public java.lang.String getName()
Getter for name.

Returns:
the name

getNameForPos

public java.lang.String getNameForPos(int pos)
See Also:
T2TDOCharset.getNameForPos(int)

getNominalWidthX

public int getNominalWidthX()
Returns the nominalWidthX. (default: 0)

Returns:
Returns the nominalWidthX.

getNotice

public java.lang.String getNotice()
Getter for notice.

Returns:
Returns the notice.

getNumberOfGlyphs

public int getNumberOfGlyphs()
Getter for numberOfGlyphs.

Returns:
Returns the numberOfGlyphs.

getPaintType

public int getPaintType()
Getter for painttype.

Returns:
Returns the painttype.

getPostscript

public java.lang.String getPostscript()
Getter for postscript.

Returns:
Returns the postscript.

getStdHW

public int getStdHW()
Returns the StdHW. (default: -)

Returns:
Returns the StdHW.

getStdVW

public int getStdVW()
Returns the StdVW. (default: -)

Returns:
Returns the StdVW.

getStemSnapH

public int[] getStemSnapH()
Returns the StemSnapH. (default: -)

Returns:
Returns the StemSnapH.

getStemSnapV

public int[] getStemSnapV()
Returns the StemSnapV. (default: -)

Returns:
Returns the StemSnapV.

getStrokewidth

public int getStrokewidth()
Getter for strokewidth.

Returns:
Returns the strokewidth.

getSubrs

public CharString getSubrs(int idx)
Returns the CharString (subrs) with the index or null, if not found.

Parameters:
idx - The index.
Returns:
Returns the CharString with the index.

getTopDictIndex

public T2Operator getTopDictIndex(java.lang.String name)
Returns the top dict index entry, if no entry found, null is returned.

Parameters:
name - The name of the entry.
Returns:
Returns the top dict index entry.

getUnderlinePosition

public int getUnderlinePosition()
Getter for underlineposition.

Returns:
Returns the underlineposition.

getUnderlineThickness

public int getUnderlineThickness()
Getter for underlinethickness.

Returns:
Returns the underlinethickness.

getVersion

public java.lang.String getVersion()
Getter for version.

Returns:
Returns the version.

getWeight

public java.lang.String getWeight()
Getter for weight.

Returns:
Returns the weight.

init

public void init(RandomAccessR rar,
                 OtfTableCFF cff,
                 int baseoffset)
          throws java.io.IOException
Initialize the font.

Parameters:
rar - The input.
cff - The cff table.
baseoffset - The baseoffset of the table.
Throws:
java.io.IOException - if a io-error occurred.

isCid

public boolean isCid()
Getter for isCID.

Returns:
Returns the isCID.

isFixedPitch

public boolean isFixedPitch()
Getter for isfixedpitch.

Returns:
Returns the isfixedpitch.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

writeXML

public void writeXML(XMLStreamWriter writer)
              throws java.io.IOException
Description copied from interface: XMLWriterConvertible
Write the data to a XMLStreamWriter.

Specified by:
writeXML in interface XMLWriterConvertible
Parameters:
writer - the XML-Writer
Throws:
java.io.IOException - if an IO-error occurs.
See Also:
XMLWriterConvertible.writeXML( org.extex.util.xml.XMLStreamWriter)