ImageToSVG

SVG lengthAdjust Attribute

lengthAdjust controls whether textLength adjustments affect only spacing between characters or also the glyphs themselves.

Preset:
Colors:
VTracer vectorization + SVGO optimizationPrivacy protected

The Two lengthAdjust Values

lengthAdjust accepts two values: spacing (the default), which adjusts only the gaps between characters to reach the target textLength while keeping each glyph's natural shape and width unchanged, and spacingAndGlyphs, which additionally scales the glyphs themselves horizontally, achieving a more precise fit at the cost of potentially distorting letterforms.

  • spacing (default) adjusts only inter-character gaps, preserving glyph shapes
  • spacingAndGlyphs additionally scales the glyphs themselves horizontally
  • The tradeoff is fit precision versus potential letterform distortion

Choosing the Right Value for a Given Use Case

The default spacing value is usually the safer choice for readable body text or labels, since it never distorts individual letter shapes, while spacingAndGlyphs becomes useful specifically when an exact width match matters more than perfect letterform fidelity, such as fitting a label precisely within a rigid, fixed-width diagram element.

  • spacing is generally safer for readable body text and standard labels
  • spacingAndGlyphs suits cases where exact width match matters most
  • Useful specifically for fitting labels precisely within rigid diagram elements

Frequently Asked Questions

Will spacingAndGlyphs noticeably distort my text for a small width adjustment?

For small adjustments the distortion is often barely noticeable, but for large compression or expansion amounts, the letterform stretching can become visually obvious, so testing the specific adjustment amount is worthwhile.

Does lengthAdjust do anything without textLength also being set?

No, lengthAdjust only takes effect in combination with a textLength value specified on the same element — without textLength, there's no target width for lengthAdjust to control the fitting behavior toward.

Related guides

Ready to Convert Your Image to SVG?

Free online converter — no sign-up, no watermarks, results in under 3 seconds.

Try It Free — Convert Image to SVG