org.apache.batik.gvt.font
Class AWTFontFamily

java.lang.Object
  extended by org.apache.batik.gvt.font.AWTFontFamily
All Implemented Interfaces:
GVTFontFamily

public class AWTFontFamily
extends Object
implements GVTFontFamily

A font family class for AWT fonts.


Field Summary
protected  Font font
           
protected  GVTFontFace fontFace
           
static AttributedCharacterIterator.Attribute TEXT_COMPOUND_DELIMITER
           
 
Constructor Summary
AWTFontFamily(GVTFontFace fontFace)
          Constructs an AWTFontFamily with the specified familyName.
AWTFontFamily(GVTFontFace fontFace, Font font)
          Constructs an AWTFontFamily with the specified familyName.
AWTFontFamily(String familyName)
          Constructs an AWTFontFamily with the specified familyName.
 
Method Summary
 GVTFont deriveFont(float size, AttributedCharacterIterator aci)
          Derives a GVTFont object of the correct size.
 GVTFont deriveFont(float size, Map attrs)
          Derives a GVTFont object of the correct size from an attribute Map.
 String getFamilyName()
          Returns the font family name.
 GVTFontFace getFontFace()
          Returns the font-face information for this font family.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEXT_COMPOUND_DELIMITER

public static final AttributedCharacterIterator.Attribute TEXT_COMPOUND_DELIMITER

fontFace

protected GVTFontFace fontFace

font

protected Font font
Constructor Detail

AWTFontFamily

public AWTFontFamily(GVTFontFace fontFace)
Constructs an AWTFontFamily with the specified familyName.

Parameters:
fontFace - The name of the font family.

AWTFontFamily

public AWTFontFamily(String familyName)
Constructs an AWTFontFamily with the specified familyName.

Parameters:
familyName - The name of the font family.

AWTFontFamily

public AWTFontFamily(GVTFontFace fontFace,
                     Font font)
Constructs an AWTFontFamily with the specified familyName.

Parameters:
fontFace - The name of the font family.
Method Detail

getFamilyName

public String getFamilyName()
Returns the font family name.

Specified by:
getFamilyName in interface GVTFontFamily
Returns:
The family name.

getFontFace

public GVTFontFace getFontFace()
Returns the font-face information for this font family.

Specified by:
getFontFace in interface GVTFontFamily

deriveFont

public GVTFont deriveFont(float size,
                          AttributedCharacterIterator aci)
Derives a GVTFont object of the correct size.

Specified by:
deriveFont in interface GVTFontFamily
Parameters:
size - The required size of the derived font.
aci - The character iterator that will be rendered using the derived font.

deriveFont

public GVTFont deriveFont(float size,
                          Map attrs)
Derives a GVTFont object of the correct size from an attribute Map.

Specified by:
deriveFont in interface GVTFontFamily
Parameters:
size - The required size of the derived font.
attrs - The Attribute Map to get Values from.


Copyright © 2008 Apache Software Foundation. All Rights Reserved.