public class SVGFontFamily extends java.lang.Object implements GVTFontFamily
Modifier and Type | Field and Description |
---|---|
protected java.lang.Boolean |
complex |
protected BridgeContext |
ctx |
protected Element |
fontElement |
protected GVTFontFace |
fontFace |
static java.text.AttributedCharacterIterator.Attribute |
TEXT_COMPOUND_ID |
Constructor and Description |
---|
SVGFontFamily(GVTFontFace fontFace,
Element fontElement,
BridgeContext ctx)
Constructs an SVGFontFamily.
|
Modifier and Type | Method and Description |
---|---|
GVTFont |
deriveFont(float size,
java.text.AttributedCharacterIterator aci)
Derives a GVTFont object of the correct size.
|
GVTFont |
deriveFont(float size,
java.util.Map attrs)
Derives a GVTFont object of the correct size from an attribute Map.
|
java.lang.String |
getFamilyName()
Returns the family name of this font.
|
GVTFontFace |
getFontFace()
Returns the font-face associated with this font family.
|
boolean |
isComplex()
This method looks at the SVG font and checks if any of
the glyphs use renderable child elements.
|
static boolean |
isComplex(Element fontElement,
BridgeContext ctx) |
public static final java.text.AttributedCharacterIterator.Attribute TEXT_COMPOUND_ID
protected GVTFontFace fontFace
protected Element fontElement
protected BridgeContext ctx
protected java.lang.Boolean complex
public SVGFontFamily(GVTFontFace fontFace, Element fontElement, BridgeContext ctx)
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.public java.lang.String getFamilyName()
getFamilyName
in interface GVTFontFamily
public GVTFontFace getFontFace()
getFontFace
in interface GVTFontFamily
public GVTFont deriveFont(float size, java.text.AttributedCharacterIterator aci)
deriveFont
in interface GVTFontFamily
size
- The required size of the derived font.aci
- The character iterator containing the text to be rendered
using the derived font.public GVTFont deriveFont(float size, java.util.Map attrs)
deriveFont
in interface GVTFontFamily
size
- The required size of the derived font.attrs
- The Attribute Map to get Values from.public boolean isComplex()
isComplex
in interface GVTFontFamily
public static boolean isComplex(Element fontElement, BridgeContext ctx)
Copyright © 2022 Apache Software Foundation. All Rights Reserved.