Package com.kitfox.svg
Class Font
- java.lang.Object
-
- com.kitfox.svg.SVGElement
-
- com.kitfox.svg.Font
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
FontSystem
public class Font extends SVGElement
Implements an embedded font. SVG specification: http://www.w3.org/TR/SVG/fonts.html- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description (package private) FontFace
fontFace
(package private) java.util.HashMap<java.lang.String,SVGElement>
glyphs
(package private) int
horizAdvX
(package private) int
horizOriginX
(package private) int
horizOriginY
(package private) MissingGlyph
missingGlyph
static java.lang.String
TAG_NAME
(package private) int
vertAdvY
(package private) int
vertOriginX
(package private) int
vertOriginY
-
Fields inherited from class com.kitfox.svg.SVGElement
children, contexts, cssClass, diagram, dirty, id, ignorePresAttrib, inlineStyles, parent, presAttribs, serialVersionUID, SVG_NS, trackManager, xmlBase
-
-
Constructor Summary
Constructors Constructor Description Font()
Creates a new instance of Font
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
build()
Called by internal processes to rebuild the geometry of this node from it's presentation attributes, style attributes and animated tracks.FontFace
getFontFace()
MissingGlyph
getGlyph(java.lang.String unicode)
int
getHorizAdvX()
int
getHorizOriginX()
int
getHorizOriginY()
java.lang.String
getTagName()
int
getVertAdvY()
int
getVertOriginX()
int
getVertOriginY()
void
loaderAddChild(SVGLoaderHelper helper, SVGElement child)
Called after the start element but before the end element to indicate each child tag that has been processedvoid
loaderEndElement(SVGLoaderHelper helper)
Called to indicate that this tag and the tags it contains have been completely processed, and that it should finish any load processes.void
setFontFace(FontFace face)
boolean
updateTime(double curTime)
Updates all attributes in this diagram associated with a time event.-
Methods inherited from class com.kitfox.svg.SVGElement
addAttribute, buildPath, getChild, getChild, getChildren, getId, getInlineAttributes, getNumChildren, getParent, getParentContext, getPath, getPres, getPresAbsolute, getPresentationAttributes, getRoot, getStyle, getStyle, getStyle, getStyleAbsolute, getXMLBase, hasAttribute, indexOfChild, lerp, loaderAddText, loaderStartElement, nextFloat, parsePathList, parseSingleTransform, parseTransform, popParentContext, pushParentContext, removeAttribute, removeChild, setAttribute, setDiagram, setParent, swapChildren
-
-
-
-
Field Detail
-
TAG_NAME
public static final java.lang.String TAG_NAME
- See Also:
- Constant Field Values
-
horizOriginX
int horizOriginX
-
horizOriginY
int horizOriginY
-
horizAdvX
int horizAdvX
-
vertOriginX
int vertOriginX
-
vertOriginY
int vertOriginY
-
vertAdvY
int vertAdvY
-
fontFace
FontFace fontFace
-
missingGlyph
MissingGlyph missingGlyph
-
glyphs
final java.util.HashMap<java.lang.String,SVGElement> glyphs
-
-
Method Detail
-
getTagName
public java.lang.String getTagName()
- Specified by:
getTagName
in classSVGElement
-
loaderAddChild
public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException
Called after the start element but before the end element to indicate each child tag that has been processed- Overrides:
loaderAddChild
in classSVGElement
- Throws:
SVGElementException
-
loaderEndElement
public void loaderEndElement(SVGLoaderHelper helper) throws SVGParseException
Description copied from class:SVGElement
Called to indicate that this tag and the tags it contains have been completely processed, and that it should finish any load processes.- Overrides:
loaderEndElement
in classSVGElement
- Throws:
SVGParseException
-
build
protected void build() throws SVGException
Description copied from class:SVGElement
Called by internal processes to rebuild the geometry of this node from it's presentation attributes, style attributes and animated tracks.- Overrides:
build
in classSVGElement
- Throws:
SVGException
-
getFontFace
public FontFace getFontFace()
-
setFontFace
public void setFontFace(FontFace face)
-
getGlyph
public MissingGlyph getGlyph(java.lang.String unicode)
-
getHorizOriginX
public int getHorizOriginX()
-
getHorizOriginY
public int getHorizOriginY()
-
getHorizAdvX
public int getHorizAdvX()
-
getVertOriginX
public int getVertOriginX()
-
getVertOriginY
public int getVertOriginY()
-
getVertAdvY
public int getVertAdvY()
-
updateTime
public boolean updateTime(double curTime) throws SVGException
Updates all attributes in this diagram associated with a time event. Ie, all attributes with track information.- Specified by:
updateTime
in classSVGElement
- Returns:
- - true if this node has changed state as a result of the time update
- Throws:
SVGException
-
-