org.apache.batik.bridge
Class SVGFontFamily

java.lang.Object
  |
  +--org.apache.batik.bridge.SVGFontFamily
All Implemented Interfaces:
GVTFontFamily

public class SVGFontFamily
extends java.lang.Object
implements GVTFontFamily

A font family class for SVG fonts.


Field Summary
protected  BridgeContext ctx
           
protected  Element fontElement
           
protected  SVGFontFace fontFace
           
 
Constructor Summary
SVGFontFamily(SVGFontFace fontFace, Element fontElement, BridgeContext ctx)
          Constructs an SVGFontFamily.
 
Method Summary
 GVTFont deriveFont(float size, java.text.AttributedCharacterIterator aci)
          Derives a GVTFont object of the correct size.
 java.lang.String getFamilyName()
          Returns the family name of this font.
 SVGFontFace getFontFace()
          Returns the font-face associated with this font family.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fontFace

protected SVGFontFace fontFace

fontElement

protected Element fontElement

ctx

protected BridgeContext ctx
Constructor Detail

SVGFontFamily

public SVGFontFamily(SVGFontFace fontFace,
                     Element fontElement,
                     BridgeContext ctx)
Constructs an SVGFontFamily.
Parameters:
fontFace - The font face object that describes this font family.
fontElement - The element that contains the font data for this family.
ctx - The bridge context. This is required for lazily loading the font data at render time.
Method Detail

getFamilyName

public java.lang.String getFamilyName()
Returns the family name of this font.
Specified by:
getFamilyName in interface GVTFontFamily
Returns:
The font family name.

getFontFace

public SVGFontFace getFontFace()
Returns the font-face associated with this font family.
Returns:
The font face.

deriveFont

public GVTFont deriveFont(float size,
                          java.text.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 containing the text to be rendered using the derived font.
Returns:
The derived font.


Copyright © 2002 Apache Software Foundation. All Rights Reserved.