de.dante.extex.font
Interface FontFactory

All Known Implementing Classes:
FontFactoryImpl

public interface FontFactory

This interface describes a factory to manage fonts.

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

Field Summary
static java.lang.String AFM_EXTENSION
          AFM-Extension
static java.lang.String EFM_EXTENSION
          EFM-Extension
static java.lang.String OTF_EXTENSION
          OTF-Extension
static java.lang.String TFM_EXTENSION
          TFM-Extension
static java.lang.String TTF_EXTENSION
          TTF-Extension
static java.lang.String VF_EXTENSION
          VF-Extension
 
Method Summary
 Font getInstance(FountKey key)
          Return a new instance.
 Font getInstance(TFMFont tfm, FountKey key)
          Return a new instance.
 Font getInstance(VFFont vf, FountKey key)
          Return a new instance.
 PSFontsMapReader getPsfm()
          Returns the psfontmapreader.
 AfmFont readAFMFont(java.lang.String name)
          Read an afm font.
 EfmReader readEFMFont(java.lang.String name)
          Read a tfm font.
 TFMFont readTFMFont(java.lang.String name)
          Read a tfm font.
 VFFont readVFFont(java.lang.String name)
          Read a vf font.
 

Field Detail

AFM_EXTENSION

public static final java.lang.String AFM_EXTENSION
AFM-Extension

See Also:
Constant Field Values

EFM_EXTENSION

public static final java.lang.String EFM_EXTENSION
EFM-Extension

See Also:
Constant Field Values

OTF_EXTENSION

public static final java.lang.String OTF_EXTENSION
OTF-Extension

See Also:
Constant Field Values

TFM_EXTENSION

public static final java.lang.String TFM_EXTENSION
TFM-Extension

See Also:
Constant Field Values

TTF_EXTENSION

public static final java.lang.String TTF_EXTENSION
TTF-Extension

See Also:
Constant Field Values

VF_EXTENSION

public static final java.lang.String VF_EXTENSION
VF-Extension

See Also:
Constant Field Values
Method Detail

getInstance

public Font getInstance(FountKey key)
                 throws ConfigurationException,
                        FontException
Return a new instance. If the name is empty or null, then the NullFont are returned.

Parameters:
key - the fount key
Returns:
Returns the new font instance.
Throws:
ConfigurationException - from the resource finder.
FontException - if a font error occurred.

getInstance

public Font getInstance(TFMFont tfm,
                        FountKey key)
                 throws ConfigurationException,
                        FontException
Return a new instance. If the name is empty or null, then the NullFont are returned.

Parameters:
tfm - the tfm font
key - the fount key
Returns:
the new font instance.
Throws:
ConfigurationException - from the resource finder.
FontException - if a font error occurred.

getInstance

public Font getInstance(VFFont vf,
                        FountKey key)
                 throws ConfigurationException,
                        FontException
Return a new instance. If the name is empty or null, then the NullFont are returned.

Parameters:
vf - the vf-font
key - the fount key
Returns:
Returns the new font instance.
Throws:
ConfigurationException - from the resource finder.
FontException - if a font error occurred.

getPsfm

public PSFontsMapReader getPsfm()
                         throws FontException,
                                ConfigurationException
Returns the psfontmapreader.

Returns:
Returns the psfm
Throws:
FontException - if a font error occurs.
ConfigurationException - from the config-system.

readAFMFont

public AfmFont readAFMFont(java.lang.String name)
                    throws ConfigurationException,
                           FontException
Read an afm font.

Parameters:
name - the name of the afm file
Returns:
the afm font or null, if not found
Throws:
ConfigurationException - from the resource finder
FontException - in case of an font error

readEFMFont

public EfmReader readEFMFont(java.lang.String name)
                      throws ConfigurationException,
                             FontException
Read a tfm font.

Parameters:
name - the name of the tfm file
Returns:
the tfm font or null, if not found
Throws:
ConfigurationException - from the resource finder
FontException - in case of an font error

readTFMFont

public TFMFont readTFMFont(java.lang.String name)
                    throws ConfigurationException,
                           FontException
Read a tfm font.

Parameters:
name - the name of the tfm file
Returns:
the tfm font or null, if not found
Throws:
ConfigurationException - from the resource finder
FontException - in case of an font error

readVFFont

public VFFont readVFFont(java.lang.String name)
                  throws ConfigurationException,
                         FontException
Read a vf font.

Parameters:
name - the name of the vf file
Returns:
the vf font or null, if not found
Throws:
ConfigurationException - from the resource finder
FontException - in case of an font error