Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
getSubStringLength
Collapse the table of content
Expand the table of content

getSubStringLength method

Calculates the total sum of all advance values from rendering the specified substring of the characters.

Scalable Vector Graphics: Text, Section 10.17.1Internet Explorer 9

 

Syntax


 retVal = object.getSubStringLength(charnum, nchars);

Parameters

charnum [in]

Type: long

The index of the first character in the substring, where the first character has an index of 0.

nchars [in]

Type: long

The number of characters in the substring. If the nchars parameter specifies more characters than are available, the substring consists of all characters starting with the charnum character until the end of the list of characters.

Standards information

Remarks

The total text advance distance includes the advance value on the glyphs (horizontal or vertical), kerning effects, letter-spacing effects, word-spacing effects, and adjustments because of the dx and dy attributes on tSpan elements.

If multiple consecutive characters are rendered inseparably (for example, as a single glyph or a sequence of glyphs, or because the range encompasses half of a surrogate pair), and if the nchars parameter is greater than 0, the measured range (i.e., total advance distance) is expanded so that each of the inseparable characters are included.

See also

SVGTextElement
SVGTextPathElement
SVGTextPositioningElement
SVGTSpanElement
SVGTextContentElement

 

 

Show:
© 2015 Microsoft