com.flagstone.transform.util.font
Class FontRegistry

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

public final class FontRegistry
extends Object

FontRegistry is used to provide a directory for registering FontProviders that are used to decode different font formats.


Method Summary
static FontDecoder getFontProvider(String type)
          Get the provider that can be used to decode a given font format.
static void registerProvider(String mimeType, FontProvider decoder)
          Register a FontDecoder to handle fonts in the specified format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

registerProvider

public static void registerProvider(String mimeType,
                                    FontProvider decoder)
Register a FontDecoder to handle fonts in the specified format. Currently Java AWT, TrueType/OpenType and Flash fonts are supported.

Parameters:
mimeType - the string identifying the image format.
decoder - any class that implements the FontDecoder interface.

getFontProvider

public static FontDecoder getFontProvider(String type)
Get the provider that can be used to decode a given font format.

Parameters:
type - string defined in FontEncoding identifying the font format.
Returns:
an object implementing the ImageDecoder interface that can be used to decode the image data.


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