Package de.intarsys.cwt.font
Class FontEnvironment
- java.lang.Object
-
- de.intarsys.cwt.font.FontEnvironment
-
public class FontEnvironment extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description FontEnvironment()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FontEnvironmentget()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 voidloadFontClassLoader(de.intarsys.cwt.freetype.Library library, java.lang.ClassLoader loader)protected voidloadFontDirectory(de.intarsys.cwt.freetype.Library library, java.io.File directory)protected voidloadFontFile(de.intarsys.cwt.freetype.Library library, java.io.File file)protected voidloadFontMapClassLoader(de.intarsys.cwt.freetype.Library library, java.lang.ClassLoader loader)protected IFontloadFontUnchecked(de.intarsys.cwt.freetype.Library library, java.lang.String filepath)protected voidloadSystemFonts(de.intarsys.cwt.freetype.Library library)protected voidloadUserFonts(de.intarsys.cwt.freetype.Library library)protected voidparseMaps(de.intarsys.cwt.freetype.Library library, java.lang.ClassLoader loader, java.io.InputStream is)protected voidprocessFontFile(de.intarsys.cwt.freetype.Library library, java.io.File file)protected voidprocessFontMap(de.intarsys.cwt.freetype.Library library, java.lang.ClassLoader loader, java.lang.String map)voidregisterFontClassLoader(java.lang.ClassLoader loader)voidregisterFontDirectory(java.io.File directory)voidregisterFontFile(java.io.File file)booleanregisterSystemFonts()booleanregisterUserFonts()static voidset(FontEnvironment environment)
-
-
-
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()
-
-