Synopsisenum PangoDirection; PangoDirection pango_unichar_direction (gunichar ch); PangoDirection pango_find_base_dir (const gchar *text, gint length); gboolean pango_get_mirror_char (gunichar ch, gunichar *mirrored_ch); enum PangoBidiType; PangoBidiType pango_bidi_type_for_unichar (gunichar ch); DescriptionPango 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 Detailsenum PangoDirectiontypedef enum {
PANGO_DIRECTION_LTR,
PANGO_DIRECTION_RTL,
PANGO_DIRECTION_TTB_LTR,
PANGO_DIRECTION_TTB_RTL,
PANGO_DIRECTION_WEAK_LTR,
PANGO_DIRECTION_WEAK_RTL,
PANGO_DIRECTION_NEUTRAL
} 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
The
pango_unichar_direction ()PangoDirection pango_unichar_direction (gunichar ch);
Determines the inherent direction of a character; either
This function is useful to categorize characters into left-to-right
letters, right-to-left letters, and everything else. If full
Unicode bidirectional type of a character is needed,
pango_find_base_dir ()PangoDirection pango_find_base_dir (const gchar *text, gint length); Searches a string the first character that has a strong direction, according to the Unicode bidirectional algorithm.
Since 1.4 pango_get_mirror_char ()gboolean pango_get_mirror_char (gunichar ch,
gunichar *mirrored_ch);
Warning
If
Use
enum PangoBidiTypetypedef enum {
/* Strong types */
PANGO_BIDI_TYPE_L,
PANGO_BIDI_TYPE_LRE,
PANGO_BIDI_TYPE_LRO,
PANGO_BIDI_TYPE_R,
PANGO_BIDI_TYPE_AL,
PANGO_BIDI_TYPE_RLE,
PANGO_BIDI_TYPE_RLO,
/* Weak types */
PANGO_BIDI_TYPE_PDF,
PANGO_BIDI_TYPE_EN,
PANGO_BIDI_TYPE_ES,
PANGO_BIDI_TYPE_ET,
PANGO_BIDI_TYPE_AN,
PANGO_BIDI_TYPE_CS,
PANGO_BIDI_TYPE_NSM,
PANGO_BIDI_TYPE_BN,
/* Neutral types */
PANGO_BIDI_TYPE_B,
PANGO_BIDI_TYPE_S,
PANGO_BIDI_TYPE_WS,
PANGO_BIDI_TYPE_ON
} PangoBidiType;
The PangoBidiType type represents the bidirectional character type of a Unicode character as specified by the Unicode bidirectional algorithm.
Since 1.22 pango_bidi_type_for_unichar ()PangoBidiType pango_bidi_type_for_unichar (gunichar ch); Determines the normative bidirectional character type of a character, as specified in the Unicode Character Database.
A simplified version of this function is available as
Since 1.22 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||