The SVGTextContentElement
interface is implemented by elements that support rendering child text content. It is inherited by various text-related interfaces, such as SVGTextElement
, SVGTSpanElement
, SVGTRefElement
, SVGAltGlyphElement
and SVGTextPathElement
.
Constant | Value | Description |
LENGTHADJUST_UNKNOWN | 0 | Some other value. |
LENGTHADJUST_SPACING | 1 | The spacing keyword. |
LENGTHADJUST_SPACINGANDGLYPHS | 2 | The spacingAndGlyphs keyword. |
This interface also inherits properties from its parent, SVGGraphicsElement
.
SVGTextContentElement.textLength
Read only
SVGAnimatedLength
reflecting the textLength
attribute of the given element.SVGTextContentElement.lengthAdjust
Read only
SVGAnimatedEnumeration
reflecting the lengthAdjust
attribute of the given element. The numeric type values represent one of the constant values above.This interface also inherits methods from its parent, SVGGraphicsElement
.
SVGTextContentElement.getNumberOfChars()
SVGTextContentElement.getComputedTextLength()
SVGTextContentElement.getSubStringLength()
SVGTextContentElement.getStartPositionOfChar()
DOMPoint
representing the position of a typographic character after text layout has been performed. Note: In SVG 1.1 this method returned an SVGPoint
.
SVGTextContentElement.getEndPositionOfChar()
DOMPoint
representing the trailing position of a typographic character after text layout has been performed. Note: In SVG 1.1 this method returned an SVGPoint
.
SVGTextContentElement.getExtentOfChar()
DOMRect
representing the computed tight bounding box of the glyph cell that corresponds to a given typographic character.SVGTextContentElement.getRotationOfChar()
SVGTextContentElement.getCharNumAtPosition()
SVGTextContentElement.selectSubString()
Specification | Status | Comment |
---|---|---|
Scalable Vector Graphics (SVG) 2 The definition of 'SVGTextContentElement' in that specification. | Candidate Recommendation | Changed inheritance from SVGElement to SVGGraphicsElement and getStartPositionOfChar() and removed implementations of SVGTests , SVGLangSpace , SVGExternalResourcesRequired , SVGStylable interfaces and getEndPositionOfChar() to return a DOMPoint instead of an SVGPoint . |
Scalable Vector Graphics (SVG) 1.1 (Second Edition) The definition of 'SVGTextContentElement' in that specification. | Recommendation | Initial definition |
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|---|
Basic support | (Yes) | 20 (12.10240) | (Yes) | (Yes) | (Yes) | ? |
Feature | Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|
Basic support | ? | ? | ? | ? | ? | ? |
© 2005–2017 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/SVGTextContentElement