de.dante.extex.interpreter.type.font
Interface Font

All Superinterfaces:
Fount
All Known Implementing Classes:
MathFont, NullFont

public interface Font
extends Fount

Font Interface

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

Method Summary
 FixedGlue getDepth(UnicodeChar uc)
          Returns the depth of the char.
 long getEfcode(UnicodeChar uc)
          Getter for the ef code.
 Glyph getGlyph(UnicodeChar uc)
          Deprecated. the use should be avoided in favor of the direct access methods
 FixedGlue getHeight(UnicodeChar uc)
          Returns the height of the char.
 UnicodeChar getHyphenChar()
          Return the hyphenation character.
 FixedDimen getItalicCorrection(UnicodeChar uc)
          Returns the italic correction of the char.
 FixedDimen getKerning(UnicodeChar uc1, UnicodeChar uc2)
          Returns the kerning between two chars.
 UnicodeChar getLigature(UnicodeChar uc1, UnicodeChar uc2)
          Returns the ligature for two chars.
 UnicodeChar getSkewChar()
          Return the skew character
 FixedGlue getWidth(UnicodeChar uc)
          Returns the width of the char.
 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 key, Dimen value)
          Setter for the font dimen register.
 void setHyphenChar(UnicodeChar hyphen)
          Set the char for hyphenation.
 void setSkewChar(UnicodeChar skew)
          Set the skew character.
 
Methods inherited from interface de.dante.extex.font.type.Fount
getActualSize, getBoundingBox, getCheckSum, getDesignSize, getEm, getEx, getFontByteArray, getFontDimen, getFontKey, getFontName, getLetterSpacing, getProperty, getSpace
 

Method Detail

getDepth

public FixedGlue getDepth(UnicodeChar uc)
Returns the depth of the char.

Parameters:
uc - the Unicode char
Returns:
the depth of the char

getEfcode

public long getEfcode(UnicodeChar uc)
Getter for the ef code.

Parameters:
uc - the character
Returns:
the ef code

getGlyph

public Glyph getGlyph(UnicodeChar uc)
Deprecated. the use should be avoided in favor of the direct access methods

Return the Glyph of a UnicodeChar, or null, if the character is not defined.

Parameters:
uc - the Unicode char
Returns:
the glyph

getHeight

public FixedGlue getHeight(UnicodeChar uc)
Returns the height of the char.

Parameters:
uc - the Unicode char
Returns:
the height of the char

getHyphenChar

public UnicodeChar getHyphenChar()
Return the hyphenation character.

Returns:
the hyphenation character

getItalicCorrection

public FixedDimen getItalicCorrection(UnicodeChar uc)
Returns the italic correction of the char.

Parameters:
uc - the Unicode char
Returns:
Returns the italic correction of the char

getKerning

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

Parameters:
uc1 - the Unicode char (first one)
uc2 - the Unicode char (second one)
Returns:
the kerning between two chars

getLigature

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

Parameters:
uc1 - the Unicode char (first one)
uc2 - the Unicode char (second one)
Returns:
Returns the ligature for two chars

getSkewChar

public UnicodeChar getSkewChar()
Return the skew character

Returns:
the skew character

getWidth

public FixedGlue getWidth(UnicodeChar uc)
Returns the width of the char.

Parameters:
uc - the Unicode char
Returns:
the width of the char

hasGlyph

public 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

public 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

public void setFontDimen(java.lang.String key,
                         Dimen value)
Setter for the font dimen register.

Parameters:
key - the key
value - the value for the key

setHyphenChar

public void setHyphenChar(UnicodeChar hyphen)
Set the char for hyphenation.

Parameters:
hyphen - the char to set

setSkewChar

public void setSkewChar(UnicodeChar skew)
Set the skew character.

Parameters:
skew - the new skew character