lengthAdjust attribute | lengthAdjust property
Gets or sets the lengthAdjust attribute on the given element.
![]() ![]() |
Syntax
| HTML |
|---|
<element lengthAdjust="p" ... > |
| JavaScript |
|---|
p = object.lengthAdjust |
Property values
Type: Object
The lengthAdjust attribute on the given element.
Standards information
- Scalable Vector Graphics: Text, Section 10.4
Remarks
Indicates the type of adjustments to perform in order to make the rendered length of the text match the value specified on the textLength attribute.
A value of spacing indicates that only the advance values are adjusted. The glyphs themselves are not stretched or compressed.
A value of spacingAndGlyphs indicates that the advance values are adjusted and the glyphs themselves are stretched or compressed in one axis (that is, in a direction parallel to the inline-progression direction).
The correct start and end positions for the text strings are guaranteed, but the locations of intermediate glyphs are not predictable because browsers might employ advanced algorithms to stretch or compress text strings in order to balance correct start and end positioning with optimal typography.
Be aware that, for a text string that contains n characters, the adjustments to the advance values often occur only for n-1 characters, whereas stretching or compressing of the glyphs will be applied to all n characters.
If the attribute is not specified, the effect is as if a value of spacing were specified.
See also

