org.extex.font.format
Class NullExtexFont

java.lang.Object
  extended by org.extex.font.format.NullExtexFont
All Implemented Interfaces:
BaseFont, ExtexFont

public class NullExtexFont
extends java.lang.Object
implements ExtexFont

This class implements a dummy font which does not contain any characters.

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

Constructor Summary
NullExtexFont()
           
 
Method Summary
 FontKey getActualFontKey()
          Returns the actual FontKey for this font after a font substitution.
 FixedDimen getActualSize()
          Returns the actual size of the font.
 FixedGlue getDepth(UnicodeChar uc)
          Returns the depth of the char.
 FixedDimen getDesignSize()
          Returns the design size of the font.
 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 the char.
 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.
 FixedCount getScaleFactor()
          Returns the scale factor of the font.
 FixedGlue getSpace()
          Returns the size of the 'space'.
 FixedGlue getWidth(UnicodeChar uc)
          Returns the width of the char.
 boolean hasGlyph(UnicodeChar uc)
          Returns true, if the glyph exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullExtexFont

public NullExtexFont()
Method Detail

getActualFontKey

public FontKey getActualFontKey()
Returns the actual FontKey for this font after a font substitution.

Specified by:
getActualFontKey in interface BaseFont
Returns:
Returns the actual FontKey for this font.
See Also:
BaseFont.getActualFontKey()

getActualSize

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

Specified by:
getActualSize in interface ExtexFont
Returns:
Returns the actual size of the font.
See Also:
ExtexFont.getActualSize()

getDepth

public FixedGlue getDepth(UnicodeChar uc)
Returns the depth of the char. If the character is not defined or an invalid value is given, then the depth 0pt is returned.

Specified by:
getDepth in interface ExtexFont
Parameters:
uc - The Unicode char.
Returns:
Returns the depth of the char.
See Also:
ExtexFont.getDepth(org.extex.core.UnicodeChar)

getDesignSize

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

Specified by:
getDesignSize in interface ExtexFont
Returns:
Returns the design size of the font.
See Also:
ExtexFont.getDesignSize()

getEm

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

Specified by:
getEm in interface ExtexFont
Returns:
Returns the size of 'M'.
See Also:
ExtexFont.getEm()

getEx

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

Specified by:
getEx in interface ExtexFont
Returns:
Returns the size of 'x'.
See Also:
ExtexFont.getEx()

getFontDimen

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

The size are multiples of the design size!

Specified by:
getFontDimen in interface ExtexFont
Parameters:
name - The name of the parameter.
Returns:
Returns the size of the parameter with the name 'name'.
See Also:
ExtexFont.getFontDimen(java.lang.String)

getFontKey

public FontKey getFontKey()
Returns the FontKey for this font.

Specified by:
getFontKey in interface BaseFont
Returns:
Returns the FontKey for this font.
See Also:
BaseFont.getFontKey()

getFontName

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

Specified by:
getFontName in interface ExtexFont
Returns:
Returns the name of the font.
See Also:
ExtexFont.getFontName()

getHeight

public FixedGlue getHeight(UnicodeChar uc)
Returns the height of the char. If the character is not defined or an invalid value is given, then the height 0pt is returned.

Specified by:
getHeight in interface ExtexFont
Parameters:
uc - The Unicode char.
Returns:
Returns the height of the char.
See Also:
ExtexFont.getHeight(org.extex.core.UnicodeChar)

getItalicCorrection

public FixedDimen getItalicCorrection(UnicodeChar uc)
Returns the italic correction of the char. If the character is not defined or an invalid value is given, then the italic correction 0pt is returned.

Specified by:
getItalicCorrection in interface ExtexFont
Parameters:
uc - The Unicode char.
Returns:
Returns the italic correction of the char.
See Also:
ExtexFont.getItalicCorrection(org.extex.core.UnicodeChar)

getKerning

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

Specified by:
getKerning in interface ExtexFont
Parameters:
uc1 - The Unicode char (first one).
uc2 - The Unicode char (second one).
Returns:
Returns the kerning between two chars.
See Also:
ExtexFont.getKerning(org.extex.core.UnicodeChar, org.extex.core.UnicodeChar)

getLigature

public UnicodeChar getLigature(UnicodeChar uc1,
                               UnicodeChar uc2)
Returns the ligature for two chars. If no ligature exists then null is returned.

Specified by:
getLigature in interface ExtexFont
Parameters:
uc1 - The Unicode char (first one).
uc2 - The Unicode char (second one).
Returns:
Returns the ligature for two chars.
See Also:
ExtexFont.getLigature(org.extex.core.UnicodeChar, org.extex.core.UnicodeChar)

getScaleFactor

public FixedCount getScaleFactor()
Returns the scale factor of the font. The scale factor is a multiple of 1000.

Specified by:
getScaleFactor in interface ExtexFont
Returns:
Returns the scale factor of the font.
See Also:
ExtexFont.getScaleFactor()

getSpace

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

Specified by:
getSpace in interface ExtexFont
Returns:
Returns the size of the 'space'.
See Also:
ExtexFont.getSpace()

getWidth

public FixedGlue getWidth(UnicodeChar uc)
Returns the width of the char. If the character is not defined or an invalid value is given, then the width 0pt is returned.

Specified by:
getWidth in interface ExtexFont
Parameters:
uc - The Unicode char.
Returns:
Returns the width of the char.
See Also:
ExtexFont.getWidth(org.extex.core.UnicodeChar)

hasGlyph

public boolean hasGlyph(UnicodeChar uc)
Returns true, if the glyph exists.

Specified by:
hasGlyph in interface ExtexFont
Parameters:
uc - the unicode char
Returns:
true, if the glyph exists.
See Also:
ExtexFont.hasGlyph(org.extex.core.UnicodeChar)