VOOZH about

URL: https://www.geeksforgeeks.org/html/svg-lengthadjust-attribute/

⇱ SVG lengthAdjust Attribute - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

SVG lengthAdjust Attribute

Last Updated : 31 Mar, 2022

The lengthAdjust attribute is used to decide the stretching of the text within the length defined by the textLength attribute. The elements which are using this attribute are <text>, <textPath>, <tref>,  and <tspan>.

Syntax:

lengthAdjust = spacing | spacingAndGlyphs

Attribute values: The lengthAdjust attribute accepts the values mentioned above and described below.

  • spacing: It will adjust the spacing between glyphs but will not stretch or squeeze the glyphs themselves.
  • spacingAndGlyphs: It will adjust both spacing between glyphs and glyph size.

Note: The default value of lengthAdjust attribute is spacing.

Below examples illustrates the use of lengthAdjust attribute.

Example 1:

Output:

👁 Image

Example 2:

Output:

👁 Image

Example 3:

Output:

👁 Image

Example 4:

Output:

👁 Image
Comment