com.flagstone.transform.util.font
Class FontFactory

java.lang.Object
  extended by com.flagstone.transform.util.font.FontFactory

public final class FontFactory
extends Object

ImageFactory is used to generate an image definition object from an image stored in a file, references by a URL or read from an stream. An plug-in architecture allows decoders to be registered to handle different image formats. The ImageFactory provides a standard interface for using the decoders.


Constructor Summary
FontFactory()
           
 
Method Summary
 List<Font> getFonts()
          Get the list of fonts decoded.
 void read(File file)
          Read a font stored in the specified file.
 void read(URL url)
          Read a font referenced by a URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontFactory

public FontFactory()
Method Detail

read

public void read(File file)
          throws IOException,
                 DataFormatException
Read a font stored in the specified file.

Parameters:
file - a file containing the abstract path to the font.
Throws:
IOException - if there is an error reading the file.
DataFormatException - if there is a problem decoding the font, either it is in an unsupported format or an error occurred while decoding the data.

read

public void read(URL url)
          throws IOException,
                 DataFormatException
Read a font referenced by a URL.

Parameters:
url - the Uniform Resource Locator referencing the file.
Throws:
IOException - if there is an error reading the file.
DataFormatException - if there is a problem decoding the font, either it is in an unsupported format or an error occurred while decoding the font data.

getFonts

public List<Font> getFonts()
Get the list of fonts decoded.

Returns:
a list containing a Font object for each font decoded.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.