org.apache.batik.gvt.font
Class FontFamilyResolver

java.lang.Object
  |
  +--org.apache.batik.gvt.font.FontFamilyResolver

public class FontFamilyResolver
extends java.lang.Object

The is a utility class that is used for resolving UnresolvedFontFamilies.


Field Summary
protected static java.util.Vector awtFontFamilies
           
protected static java.util.Vector awtFonts
           
static AWTFontFamily defaultFont
          The default font.
protected static java.util.Map fonts
          List of all available fonts on the current system, plus a few common alternatives.
protected static java.util.Map resolvedFontFamilies
          This keeps track of all the resolved font families.
 
Constructor Summary
FontFamilyResolver()
           
 
Method Summary
static GVTFontFamily getFamilyThatCanDisplay(char c)
           
static GVTFontFamily resolve(UnresolvedFontFamily fontFamily)
          Resolves an UnresolvedFontFamily into a GVTFontFamily.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultFont

public static final AWTFontFamily defaultFont
The default font. This will be used when no font families can be resolved for a particular text chunck/run.

fonts

protected static final java.util.Map fonts
List of all available fonts on the current system, plus a few common alternatives.

awtFontFamilies

protected static final java.util.Vector awtFontFamilies

awtFonts

protected static final java.util.Vector awtFonts

resolvedFontFamilies

protected static java.util.Map resolvedFontFamilies
This keeps track of all the resolved font families. This is to hopefully reduce the number of font family objects used.
Constructor Detail

FontFamilyResolver

public FontFamilyResolver()
Method Detail

resolve

public static GVTFontFamily resolve(UnresolvedFontFamily fontFamily)
Resolves an UnresolvedFontFamily into a GVTFontFamily. If the font family cannot be resolved then null will be returned.
Parameters:
fontFamily - The UnresolvedFontFamily to resolve
textAttributes - The attributes of the font that will be derived from the resolved font family.
Returns:
A resolved GVTFontFamily or null if the font family could not be resolved.

getFamilyThatCanDisplay

public static GVTFontFamily getFamilyThatCanDisplay(char c)


Copyright © 2002 Apache Software Foundation. All Rights Reserved.