pango-Bidirectional-Text: Bidirectional Text

Description Methods and Functions Detailed Description Enums and Flags Author(s) References

Description

Types and functions to help with handling bidirectional text

Methods and Functions

pangoUnicharDirection(ch)
pangoFindBaseDir(text, length = -1)
pangoGetMirrorChar(ch)
pangoBidiTypeForUnichar(ch)

Detailed Description

Pango supports bidirectional text (like Arabic and Hebrew) automatically. Some applications however, need some help to correctly handle bidirectional text.

The PangoDirection type can be used with pangoContextSetBaseDir to instruct Pango about direction of text, though in most cases Pango detects that correctly and automatically. The rest of the facilities in this section are used internally by Pango already, and are provided to help applications that need more direct control over bidirectional setting of text.

Enums and Flags

PangoDirection

The PangoDirection type represents a direction in the Unicode bidirectional algorithm; not every value in this enumeration makes sense for every usage of PangoDirection; for example, the return value of pangoUnicharDirection and pangoFindBaseDir cannot be PANGO_DIRECTION_WEAK_LTR or PANGO_DIRECTION_WEAK_RTL, since every character is either neutral or has a strong direction; on the other hand PANGO_DIRECTION_NEUTRAL doesn't make sense to pass to pangoItemizeWithBaseDir.

The PANGO_DIRECTION_TTB_LTR, PANGO_DIRECTION_TTB_RTL values come from an earlier interpretation of this enumeration as the writing direction of a block of text and are no longer used; See PangoGravity for how vertical text is handled in Pango.

ltr

A strong left-to-right direction

rtl

A strong right-to-left direction

ttb-ltr

Deprecated value; treated the same as PANGO_DIRECTION_RTL.

ttb-rtl

Deprecated value; treated the same as PANGO_DIRECTION_LTR

PangoBidiType

The PangoBidiType type represents the bidirectional character type of a Unicode character as specified by the Unicode bidirectional algorithm (http://www.unicode.org/reports/tr9/). Since 1.22

l

Left-to-Right

lre

Left-to-Right Embedding

lro

Left-to-Right Override

r

Right-to-Left

al

Right-to-Left Arabic

rle

Right-to-Left Embedding

rlo

Right-to-Left Override

pdf

Pop Directional Format

en

European Number

es

European Number Separator

et

European Number Terminator

an

Arabic Number

cs

Common Number Separator

nsm

Nonspacing Mark

bn

Boundary Neutral

b

Paragraph Separator

s

Segment Separator

ws

Whitespace

on

Other Neutrals

Author(s)

Derived by RGtkGen from GTK+ documentation

References

https://developer.gnome.org/pango/stable/pango-Bidirectional-Text.html


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.