RGtk2 (version 2.20.31)

pango-Bidirectional-Text: Bidirectional Text

Description

Types and functions to help with handling bidirectional text

Arguments

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

References

http://library.gnome.org/devel//pango/pango-Bidirectional-Text.html