Imgix APIsRendering APITextText Rotation

Text Rotation

txt-rotate

The txt-rotate parameter rotates a text layer about its own center. Use it for corner ribbons, diagonal sale banners and angled watermark text.

The value is a number of degrees from 0 to 360, measured clockwise. Values outside that range are clamped, which has one consequence worth knowing: txt-rotate=-15 clamps to 0, it does not mean 345. To rotate counter-clockwise, subtract from 360 yourself and pass txt-rotate=345.

Unrotated, the default
sandbox-demo
txt-rotate=30 turns the layer clockwise
sandbox-demo
txt-rotate=345 for a counter-clockwise tilt
sandbox-demo
txt-rotate=90 runs the text down the image
sandbox-demo

The whole layer turns together: the glyphs, the background box, the outline and the shadow. Rotation happens after the layer is positioned, so txt-align still places the layer’s unrotated center.

The typesetting endpoint ignores txt-rotate.