Package org.apache.batik.gvt.font
Class AWTFontFamily
- java.lang.Object
-
- org.apache.batik.gvt.font.AWTFontFamily
-
- All Implemented Interfaces:
GVTFontFamily
public class AWTFontFamily extends java.lang.Object implements GVTFontFamily
A font family class for AWT fonts.- Version:
- $Id: AWTFontFamily.java 1802297 2017-07-18 13:58:12Z ssteiner $
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.Fontfontprotected GVTFontFacefontFacestatic java.text.AttributedCharacterIterator.AttributeTEXT_COMPOUND_DELIMITER
-
Constructor Summary
Constructors Constructor Description AWTFontFamily(java.lang.String familyName)Constructs an AWTFontFamily with the specified familyName.AWTFontFamily(GVTFontFace fontFace)Constructs an AWTFontFamily with the specified familyName.AWTFontFamily(GVTFontFace fontFace, java.awt.Font font)Constructs an AWTFontFamily with the specified familyName.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GVTFontderiveFont(float size, java.text.AttributedCharacterIterator aci)Derives a GVTFont object of the correct size.GVTFontderiveFont(float size, java.util.Map attrs)Derives a GVTFont object of the correct size from an attribute Map.java.lang.StringgetFamilyName()Returns the font family name.GVTFontFacegetFontFace()Returns the font-face information for this font family.booleanisComplex()This method returns true iff the font is a complex SVG font
-
-
-
Field Detail
-
TEXT_COMPOUND_DELIMITER
public static final java.text.AttributedCharacterIterator.Attribute TEXT_COMPOUND_DELIMITER
-
fontFace
protected GVTFontFace fontFace
-
font
protected java.awt.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(java.lang.String familyName)
Constructs an AWTFontFamily with the specified familyName.- Parameters:
familyName- The name of the font family.
-
AWTFontFamily
public AWTFontFamily(GVTFontFace fontFace, java.awt.Font font)
Constructs an AWTFontFamily with the specified familyName.- Parameters:
fontFace- The name of the font family.
-
-
Method Detail
-
getFamilyName
public java.lang.String getFamilyName()
Returns the font family name.- Specified by:
getFamilyNamein interfaceGVTFontFamily- Returns:
- The family name.
-
getFontFace
public GVTFontFace getFontFace()
Returns the font-face information for this font family.- Specified by:
getFontFacein interfaceGVTFontFamily
-
deriveFont
public GVTFont deriveFont(float size, java.text.AttributedCharacterIterator aci)
Derives a GVTFont object of the correct size.- Specified by:
deriveFontin interfaceGVTFontFamily- 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, java.util.Map attrs)
Derives a GVTFont object of the correct size from an attribute Map.- Specified by:
deriveFontin interfaceGVTFontFamily- Parameters:
size- The required size of the derived font.attrs- The Attribute Map to get Values from.
-
isComplex
public boolean isComplex()
Description copied from interface:GVTFontFamilyThis method returns true iff the font is a complex SVG font- Specified by:
isComplexin interfaceGVTFontFamily
-
-