org.pentaho.reporting.libraries.fonts.afm

Class AfmFontRegistry

public class AfmFontRegistry extends AbstractFontFileRegistry

Creation-Date: 21.07.2007, 20:14:05

Author: Thomas Morgner

Constructor Summary
AfmFontRegistry()
Method Summary
booleanaddFont(File font, String encoding)
Adds the fontname by creating the basefont object.
FontMetricsFactorycreateMetricsFactory()
String[]getAllRegisteredFamilies()
FontFamilygetFontFamily(String name)
String[]getRegisteredFamilies()
FontCachegetSecondLevelCache()

Constructor Detail

AfmFontRegistry

public AfmFontRegistry()

Method Detail

addFont

public boolean addFont(File font, String encoding)
Adds the fontname by creating the basefont object. This method tries to load the fonts as embeddable fonts, if this fails, it repeats the loading with the embedded-flag set to false.

Parameters: font the font file name. encoding the encoding.

Throws: java.io.IOException if the base font file could not be read.

createMetricsFactory

public FontMetricsFactory createMetricsFactory()

getAllRegisteredFamilies

public String[] getAllRegisteredFamilies()

getFontFamily

public FontFamily getFontFamily(String name)

getRegisteredFamilies

public String[] getRegisteredFamilies()

getSecondLevelCache

public FontCache getSecondLevelCache()