### Method

# Pango Layoutset_auto_dir

since: 1.4

#### Declaration [src]

    void
    pango_layout_set_auto_dir (
      PangoLayout* layout,
      gboolean auto_dir
    )

#### Description [src]

Sets whether to calculate the base direction for the layout according to its contents.

When this flag is on (the default), then paragraphs in `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 layout’s `PangoContext`. (See `pango_context_set_base_dir()`).

When the auto-computed direction of a paragraph differs from the base direction of the context, the interpretation of `PANGO_ALIGN_LEFT` and `PANGO_ALIGN_RIGHT` are swapped.

Available since: 1.4

#### Parameters

`auto_dir`

  Type: `gboolean`

  If `TRUE`, compute the bidirectional base direction from the layout’s contents.