PangoDirection

pango.types.Direction represents a direction in the Unicode bidirectional algorithm.

Not every value in this enumeration makes sense for every usage of pango.types.Direction; for example, the return value of func@unichar_direction and func@find_base_dir cannot be pango.types.Direction.WeakLtr or pango.types.Direction.WeakRtl, since every character is either neutral or has a strong direction; on the other hand pango.types.Direction.Neutral doesn't make sense to pass to func@itemize_with_base_dir.

The pango.types.Direction.TtbLtr, pango.types.Direction.TtbRtl values come from an earlier interpretation of this enumeration as the writing direction of a block of text and are no longer used. See pango.types.Gravity for how vertical text is handled in Pango.

If you are interested in text direction, you should really use fribidi directly. pango.types.Direction is only retained because it is used in some public apis.

Values

ValueMeaning
Ltr0

A strong left-to-right direction

Rtl1

A strong right-to-left direction

TtbLtr2

Deprecated value; treated the same as pango.types.Direction.Rtl.

TtbRtl3

Deprecated value; treated the same as pango.types.Direction.Ltr

WeakLtr4

A weak left-to-right direction

WeakRtl5

A weak right-to-left direction

Neutral6

No direction specified