Text Width
txt-width
The width (in pixels) to restrict the width of the text to.
The default value is calculated by the width of the output image, minus any padding on the left and right. Use txt-width[N] to override this for a specific text layer — bare txt-width applies to every layer by default.
If the text exceeds the value of txt-width, it will be clipped on a per-character basis; the maximum number of characters that will fit in the specified width will be displayed. The location of the clipping is determined by the value of the txt-clip parameter. To wrap text onto multiple lines at this width instead of clipping it, set txt-fit to wrap or wrapmax.
Please note:
txt-width is currently not supported on the
~text endpoint.
Pixels or a Fraction
A whole number is pixels multiplied by dpr. A decimal written with a dot from 0 to 1 inclusive is read as a fraction of the base image’s width instead, so txt-width=0.5 is half the image at every size.
txt-w is an accepted alias. It is reported back as txt-width in the X-Imgix-Params response header.