This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

textPositioning

Overview Table

DOM Interface
SVGElement

Notes

Remarks

Note: In addition to the attributes, properties, events, methods, and styles listed above, SVG elements also inherent core HTML attributes, properties, events, methods, and styles.

Standards information

Members

The SVGTextPositioningElement object has these methods:

  • getCharNumAtPosition: Gets the index of the character that the glyph cell bounding box contains at the specified point.
  • getComputedTextLength: Returns the total sum of all advance values from rendering all characters within the given text element.
  • getEndPositionOfChar: Gets the current text position of the specified character after the character is rendered in the user coordinate system where the glyphs that correspond to the specified character are rendered.
  • getExtentOfChar: Gets a rectangle that defines the minimum and maximum x-coordinate and y-coordinate values in the user coordinate system where the glyphs that correspond to the specified character are rendered.
  • getNumberOfChars: Gets the total number of characters that are available for rendering within the current element.
  • getRotationOfChar: Gets the rotation value of the specified character, relative to the current user coordinate system where the glyphs that corresponding to the specified character are rendered.
  • getStartPositionOfChar: Gets the current text position of the specified character before the character is rendered in the user coordinate system where the glyphs that correspond to the specified character are rendered.
  • getSubStringLength: Calculates the total sum of all advance values from rendering the specified substring of the characters.
  • hasExtension: Determines if the specified extension is supported.
  • selectSubString: Selects the specified substring, just as if a user selected the substring interactively.

The SVGTextPositioningElement object has these properties:

  • className: Gets the names of the classes that are assigned to this object.
  • dx: Gets the dx attribute on the given element.
  • dy: Gets the dy attribute on the given element.
  • externalResourcesRequired: Gets a value that indicates whether referenced resources that are not in the current document are required to correctly render a given element.
  • focusable: Determines if an element can acquire keyboard focus (that is, receive keyboard events) and be a target for field-to-field navigation actions (such as when a user presses the Tab key).
  • lengthAdjust: Gets or sets the lengthAdjust attribute on the given element.
  • ownerSVGElement: Gets the nearest ancestor svg element.
  • requiredExtensions: Gets a white space-delimited list of required language extensions.
  • requiredFeatures: Gets or sets a white space-delimited list of feature strings.
  • rotate: Gets or sets the supplemental character rotation about the current text position.
  • style: Gets a style object.
  • systemLanguage: Gets or sets a comma-separated list of language names.
  • textLength: Gets or sets the textLength attribute on the given element.
  • viewportElement: Gets the element that established the current viewport.
  • x: Gets or sets the x-coordinate value.
  • xmlbase: Gets or sets the base attribute on the element.
  • xmllang: Gets or sets a value that specifies the language that is used in the contents and attribute values of an element.
  • xmlspace: Gets or sets a value that indicates whether white space is preserved in character data.
  • y: Gets or sets the y-coordinate value.

Attributions