de.intarsys.cwt.font
Class FontEnvironment

java.lang.Object
  extended by de.intarsys.cwt.font.FontEnvironment

public class FontEnvironment
extends java.lang.Object


Constructor Summary
FontEnvironment()
           
 
Method Summary
static FontEnvironment get()
           
 java.lang.ClassLoader[] getFontClassLoaders()
           
 java.io.File[] getFontDirectories()
           
 java.io.File[] getFontFiles()
           
 java.io.File[] getSystemFontDirectories()
          This method determines the system's font directories.
protected  void loadFontClassLoader(de.intarsys.cwt.freetype.Library library, java.lang.ClassLoader loader)
           
protected  void loadFontDirectory(de.intarsys.cwt.freetype.Library library, java.io.File directory)
           
protected  void loadFontFile(de.intarsys.cwt.freetype.Library library, java.io.File file)
           
protected  void loadFontMapClassLoader(de.intarsys.cwt.freetype.Library library, java.lang.ClassLoader loader)
           
protected  IFont loadFontUnchecked(de.intarsys.cwt.freetype.Library library, java.lang.String filepath)
           
protected  void loadSystemFonts(de.intarsys.cwt.freetype.Library library)
           
protected  void loadUserFonts(de.intarsys.cwt.freetype.Library library)
           
protected  void parseMaps(de.intarsys.cwt.freetype.Library library, java.lang.ClassLoader loader, java.io.InputStream is)
           
protected  void processFontFile(de.intarsys.cwt.freetype.Library library, java.io.File file)
           
protected  void processFontMap(de.intarsys.cwt.freetype.Library library, java.lang.ClassLoader loader, java.lang.String map)
           
 void registerFontClassLoader(java.lang.ClassLoader loader)
           
 void registerFontDirectory(java.io.File directory)
           
 void registerFontFile(java.io.File file)
           
 boolean registerSystemFonts()
           
 boolean registerUserFonts()
           
static void set(FontEnvironment environment)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontEnvironment

public FontEnvironment()
Method Detail

get

public static FontEnvironment get()

set

public static void set(FontEnvironment environment)

getFontClassLoaders

public java.lang.ClassLoader[] getFontClassLoaders()

getFontDirectories

public java.io.File[] getFontDirectories()

getFontFiles

public java.io.File[] getFontFiles()

getSystemFontDirectories

public java.io.File[] getSystemFontDirectories()
This method determines the system's font directories.

Returns:
an array containing the font directory paths found on the local system

loadFontClassLoader

protected void loadFontClassLoader(de.intarsys.cwt.freetype.Library library,
                                   java.lang.ClassLoader loader)

loadFontDirectory

protected void loadFontDirectory(de.intarsys.cwt.freetype.Library library,
                                 java.io.File directory)

loadFontFile

protected void loadFontFile(de.intarsys.cwt.freetype.Library library,
                            java.io.File file)

loadFontMapClassLoader

protected void loadFontMapClassLoader(de.intarsys.cwt.freetype.Library library,
                                      java.lang.ClassLoader loader)

loadFontUnchecked

protected IFont loadFontUnchecked(de.intarsys.cwt.freetype.Library library,
                                  java.lang.String filepath)

loadSystemFonts

protected void loadSystemFonts(de.intarsys.cwt.freetype.Library library)

loadUserFonts

protected void loadUserFonts(de.intarsys.cwt.freetype.Library library)

parseMaps

protected void parseMaps(de.intarsys.cwt.freetype.Library library,
                         java.lang.ClassLoader loader,
                         java.io.InputStream is)
                  throws java.io.IOException
Throws:
java.io.IOException

processFontFile

protected void processFontFile(de.intarsys.cwt.freetype.Library library,
                               java.io.File file)
                        throws java.io.IOException
Throws:
java.io.IOException

processFontMap

protected void processFontMap(de.intarsys.cwt.freetype.Library library,
                              java.lang.ClassLoader loader,
                              java.lang.String map)
                       throws java.io.IOException
Throws:
java.io.IOException

registerFontClassLoader

public void registerFontClassLoader(java.lang.ClassLoader loader)

registerFontDirectory

public void registerFontDirectory(java.io.File directory)

registerFontFile

public void registerFontFile(java.io.File file)

registerSystemFonts

public boolean registerSystemFonts()

registerUserFonts

public boolean registerUserFonts()