org.extex.typesetter.tc.font
Interface Font

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
ModifiableFont
All Known Implementing Classes:
FontImpl, NullFont

public interface Font
extends java.io.Serializable

Font Interface.

Version:
$Revision: 5573 $
Author:
Michael Niedermair, Gerd Neugebauer

Method Summary
 FontKey getActualFontKey()
          Returns the actual FontKey for this font.
 FixedDimen getActualSize()
          Returns the actual size of the font.
 int getCheckSum()
          Returns the check sum of the font.
 FixedGlue getDepth(UnicodeChar uc)
          Returns the depth of the character.
 FixedDimen getDesignSize()
          Returns the design size of the font.
 long getEfCode(UnicodeChar uc)
          Getter for the ef code.
 FixedDimen getEm()
          Returns the size of 'M'.
 FixedDimen getEx()
          Returns the size of 'x'.
 FixedDimen getFontDimen(java.lang.String name)
          Returns the size of the parameter with the name 'name'.
 FontKey getFontKey()
          Returns the FontKey for this font.
 java.lang.String getFontName()
          Returns the name of the font.
 FixedGlue getHeight(UnicodeChar uc)
          Returns the height of a character.
 UnicodeChar getHyphenChar()
          Returns the hyphen character.
 FixedDimen getItalicCorrection(UnicodeChar uc)
          Returns the italic correction of a character.
 FixedDimen getKerning(UnicodeChar uc1, UnicodeChar uc2)
          Returns the kerning between two characters.
 UnicodeChar getLigature(UnicodeChar uc1, UnicodeChar uc2)
          Returns the ligature for two characters.
 FixedCount getScaleFactor()
          Returns the scale factor of the font.
 UnicodeChar getSkewChar()
          Returns the skew char.
 FixedGlue getSpace()
          Returns the size of the 'space'.
 FixedGlue getWidth(UnicodeChar uc)
          Returns the width of a character.
 boolean hasGlyph(UnicodeChar uc)
          Determine whether the glyph for a given character is present in this font.
 void setEfCode(UnicodeChar uc, long code)
          Setter for the ef code.
 void setFontDimen(java.lang.String name, Dimen value)
          Set the new value for the font parameter.
 void setHyphenChar(UnicodeChar uc)
          Set the hyphen character.
 void setSkewChar(UnicodeChar uc)
          Set the skew character.
 

Method Detail

getActualFontKey

FontKey getActualFontKey()
Returns the actual FontKey for this font. The font key may differ from the one requested.

Returns:
the actual FontKey for this font.

getActualSize

FixedDimen getActualSize()
Returns the actual size of the font.

Returns:
the actual size of the font.

getCheckSum

int getCheckSum()
Returns the check sum of the font. TODO: verschieben ???

Returns:
the check sum of the font

getDepth

FixedGlue getDepth(UnicodeChar uc)
Returns the depth of the character.

Parameters:
uc - the character
Returns:
the depth of the character

getDesignSize

FixedDimen getDesignSize()
Returns the design size of the font.

Returns:
the design size of the font

getEfCode

long getEfCode(UnicodeChar uc)
Getter for the ef code.

Parameters:
uc - the character
Returns:
the ef code

getEm

FixedDimen getEm()
Returns the size of 'M'.

Returns:
the size of 'M'.

getEx

FixedDimen getEx()
Returns the size of 'x'.

Returns:
Returns the size of 'x'.

getFontDimen

FixedDimen getFontDimen(java.lang.String name)
Returns the size of the parameter with the name 'name'.

The size are multiples of the design size!

Parameters:
name - The name of the parameter.
Returns:
the size of the parameter with the name 'name'.

getFontKey

FontKey getFontKey()
Returns the FontKey for this font.

Returns:
the FontKey for this font

getFontName

java.lang.String getFontName()
Returns the name of the font.

Returns:
the name of the font

getHeight

FixedGlue getHeight(UnicodeChar uc)
Returns the height of a character.

Parameters:
uc - the character
Returns:
the height of the character

getHyphenChar

UnicodeChar getHyphenChar()
Returns the hyphen character.

Returns:
the hyphen character

getItalicCorrection

FixedDimen getItalicCorrection(UnicodeChar uc)
Returns the italic correction of a character.

Parameters:
uc - the character
Returns:
the italic correction of the character

getKerning

FixedDimen getKerning(UnicodeChar uc1,
                      UnicodeChar uc2)
Returns the kerning between two characters.

Parameters:
uc1 - the first character
uc2 - the second character
Returns:
the kerning between two characters

getLigature

UnicodeChar getLigature(UnicodeChar uc1,
                        UnicodeChar uc2)
Returns the ligature for two characters.

Parameters:
uc1 - the first character
uc2 - the second character
Returns:
Returns the ligature for two characters

getScaleFactor

FixedCount getScaleFactor()
Returns the scale factor of the font.

Returns:
the scale factor of the font

getSkewChar

UnicodeChar getSkewChar()
Returns the skew char.

Returns:
the skew char

getSpace

FixedGlue getSpace()
Returns the size of the 'space'.

Returns:
the size of the 'space'.

getWidth

FixedGlue getWidth(UnicodeChar uc)
Returns the width of a character.

Parameters:
uc - the character
Returns:
the width of the character

hasGlyph

boolean hasGlyph(UnicodeChar uc)
Determine whether the glyph for a given character is present in this font.

Parameters:
uc - the character
Returns:
true iff the glyph is present

setEfCode

void setEfCode(UnicodeChar uc,
               long code)
Setter for the ef code. The ef code influences the stretchability of characters. It has a positive value. 1000 means "normal" stretchability.

Parameters:
uc - the character
code - the associated code

setFontDimen

void setFontDimen(java.lang.String name,
                  Dimen value)
Set the new value for the font parameter.

Parameters:
name - the name of the parameter
value - the value to set

setHyphenChar

void setHyphenChar(UnicodeChar uc)
Set the hyphen character.

Parameters:
uc - the hyphen character

setSkewChar

void setSkewChar(UnicodeChar uc)
Set the skew character.

Parameters:
uc - the skew character