Package: pango

Function pango:layout-auto-dir

Lambda List

pango:layout-auto-dir (layout)

Syntax

(pango:layout-auto-dir layout) => auto
(setf (pango:layout-auto-dir layout) auto)

Arguments

layout -- a pango:layout object
auto -- if true, compute the bidirectional base direction from the contents of the Pango layout

Details

The pango:layout-auto-dir function gets whether to calculate the bidirectional base direction for the Pango layout according to the contents of the Pango layout. The (setf pango:layout-auto-dir) function sets whether to calculate the bidirectional base direction for the Pango layout according to the contents of the Pango layout. When this flag is on (the default), then paragraphs in the Pango layout that begin with strong right-to-left characters (Arabic and Hebrew principally), will have right-to-left layout, paragraphs with letters from other scripts will have left-to-right layout. Paragraphs with only neutral characters get their direction from the surrounding paragraphs.

When false, the choice between left-to-right and right-to-left layout is done according to the base direction of the Pango context of the Pango layout, see the pango:context-base-dir function.

When the auto-computed direction of a paragraph differs from the base direction of the Pango context, the interpretation of :left and :right are swapped.
 

See also

#2025-2-15