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) FontFacefontFace(package private) java.util.HashMap<java.lang.String,SVGElement>glyphs(package private) inthorizAdvX(package private) inthorizOriginX(package private) inthorizOriginY(package private) MissingGlyphmissingGlyphstatic java.lang.StringTAG_NAME(package private) intvertAdvY(package private) intvertOriginX(package private) intvertOriginY-
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 voidbuild()Called by internal processes to rebuild the geometry of this node from it's presentation attributes, style attributes and animated tracks.FontFacegetFontFace()MissingGlyphgetGlyph(java.lang.String unicode)intgetHorizAdvX()intgetHorizOriginX()intgetHorizOriginY()java.lang.StringgetTagName()intgetVertAdvY()intgetVertOriginX()intgetVertOriginY()voidloaderAddChild(SVGLoaderHelper helper, SVGElement child)Called after the start element but before the end element to indicate each child tag that has been processedvoidloaderEndElement(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.voidsetFontFace(FontFace face)booleanupdateTime(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:
getTagNamein 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:
loaderAddChildin classSVGElement- Throws:
SVGElementException
-
loaderEndElement
public void loaderEndElement(SVGLoaderHelper helper) throws SVGParseException
Description copied from class:SVGElementCalled to indicate that this tag and the tags it contains have been completely processed, and that it should finish any load processes.- Overrides:
loaderEndElementin classSVGElement- Throws:
SVGParseException
-
build
protected void build() throws SVGExceptionDescription copied from class:SVGElementCalled by internal processes to rebuild the geometry of this node from it's presentation attributes, style attributes and animated tracks.- Overrides:
buildin 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 SVGExceptionUpdates all attributes in this diagram associated with a time event. Ie, all attributes with track information.- Specified by:
updateTimein classSVGElement- Returns:
- - true if this node has changed state as a result of the time update
- Throws:
SVGException
-
-