Imgix APIsRendering APITextText Direction

Text Direction

txt-dir

The txt-dir parameter sets the writing direction of a text layer, so that Arabic, Hebrew and other right-to-left captions lay out correctly.

ValueDirection
ltrLeft to right
rtlRight to left
autoInferred from the characters in the string

When the parameter is absent, layout is unchanged from the existing behavior.

Under rtl, the default alignment mirrors: a layer that would have sat at the bottom-right sits at the bottom-left instead. This matches how a right-to-left reader expects a caption to be anchored, and it means switching a localized caption to rtl usually needs no other change.

Right-to-left text with no txt-dir sits at the default bottom-right
sandbox-demo
txt-dir=rtl mirrors it to the bottom-left
sandbox-demo