com.flagstone.transform.util.font
Interface FontDecoder

All Known Implementing Classes:
SWFFontDecoder, TTFDecoder

public interface FontDecoder

FontDecoder is an interface that classes used to decode different fonts formats should implement in order to be registered with the FontRegistry.


Method Summary
 List<Font> getFonts()
          Get the list of fonts decoded.
 void read(File file)
          Read a font from a file.
 void read(URL url)
          Read a font from a file referenced by a URL.
 

Method Detail

read

void read(File file)
          throws IOException,
                 DataFormatException
Read a font from a file.

Parameters:
file - the path to the file.
Throws:
IOException - if there is an error reading the font data.
DataFormatException - if the file contains an unsupported format.

read

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

Parameters:
url - the reference to the file.
Throws:
IOException - if there is an error reading the font data.
DataFormatException - if the file contains an unsupported format.

getFonts

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

Returns:
a list of fonts.


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