org.icepdf.core.pobjects.fonts
Class FontFactory

java.lang.Object
  extended by org.icepdf.core.pobjects.fonts.FontFactory

public class FontFactory
extends java.lang.Object

Simple Factory for loading of font library if present.


Field Summary
static int FONT_OPEN_TYPE
           
static int FONT_TRUE_TYPE
           
static int FONT_TYPE_0
           
static int FONT_TYPE_1
           
static int FONT_TYPE_3
           
 
Method Summary
 FontFile createFontFile(java.io.File file, int fontType)
           
 FontFile createFontFile(Stream fontStream, int fontType)
           
 boolean foundFontEngine()
          Test if font engine is available on the class path and it has been disabled with the proeprty awtFontSubstitution.
 Font getFont(Library library, java.util.Hashtable entries)
           
static FontFactory getInstance()
          Returns a static instance of the FontManager class.
 boolean isAwtFontSubstitution()
           
 void setAwtFontSubstitution(boolean awtFontSubstitution)
           
 void toggleAwtFontSubstitution()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FONT_OPEN_TYPE

public static final int FONT_OPEN_TYPE
See Also:
Constant Field Values

FONT_TRUE_TYPE

public static final int FONT_TRUE_TYPE
See Also:
Constant Field Values

FONT_TYPE_0

public static final int FONT_TYPE_0
See Also:
Constant Field Values

FONT_TYPE_1

public static final int FONT_TYPE_1
See Also:
Constant Field Values

FONT_TYPE_3

public static final int FONT_TYPE_3
See Also:
Constant Field Values
Method Detail

getInstance

public static FontFactory getInstance()

Returns a static instance of the FontManager class.

Returns:
instance of the FontManager.

getFont

public Font getFont(Library library,
                    java.util.Hashtable entries)

createFontFile

public FontFile createFontFile(Stream fontStream,
                               int fontType)

createFontFile

public FontFile createFontFile(java.io.File file,
                               int fontType)

isAwtFontSubstitution

public boolean isAwtFontSubstitution()

setAwtFontSubstitution

public void setAwtFontSubstitution(boolean awtFontSubstitution)

toggleAwtFontSubstitution

public void toggleAwtFontSubstitution()

foundFontEngine

public boolean foundFontEngine()
Test if font engine is available on the class path and it has been disabled with the proeprty awtFontSubstitution.

Returns:
true if font engine was found, false otherwise.