8
8
<link rel="up" href="pango.html" title="Basic Pango Interfaces">
9
9
<link rel="prev" href="pango-Scripts-and-Languages.html" title="Scripts and Languages">
10
10
<link rel="next" href="pango-Vertical-Text.html" title="Vertical Text">
11
<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.15.1 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="chapter" href="pango.html" title="Basic Pango Interfaces">
14
<link rel="chapter" href="rendering.html" title="Rendering with Pango">
15
<link rel="chapter" href="lowlevel.html" title="Low Level Functionality">
16
<link rel="chapter" href="tools.html" title="Pango Tools">
17
<link rel="chapter" href="pango-hierarchy.html" title="Object Hierarchy">
18
<link rel="index" href="index-all.html" title="Index">
19
<link rel="index" href="index-deprecated.html" title="Index of deprecated symbols">
20
<link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
21
<link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
22
<link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
23
<link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
24
<link rel="index" href="index-1.10.html" title="Index of new symbols in 1.10">
25
<link rel="index" href="index-1.12.html" title="Index of new symbols in 1.12">
26
<link rel="index" href="index-1.14.html" title="Index of new symbols in 1.14">
27
<link rel="index" href="index-1.16.html" title="Index of new symbols in 1.16">
28
<link rel="index" href="index-1.18.html" title="Index of new symbols in 1.18">
29
<link rel="index" href="index-1.20.html" title="Index of new symbols in 1.20">
30
<link rel="index" href="index-1.22.html" title="Index of new symbols in 1.22">
31
<link rel="index" href="index-1.24.html" title="Index of new symbols in 1.24">
32
<link rel="index" href="index-1.26.html" title="Index of new symbols in 1.26">
33
<link rel="index" href="index-1.28.html" title="Index of new symbols in 1.26">
35
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
36
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
57
36
<td valign="top" align="right"></td>
58
37
</tr></table></div>
59
<div class="refsynopsisdiv" title="Synopsis">
38
<div class="refsynopsisdiv">
60
39
<a name="pango-Bidirectional-Text.synopsis"></a><h2>Synopsis</h2>
61
40
<pre class="synopsis">enum <a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection">PangoDirection</a>;
62
<a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection"><span class="returnvalue">PangoDirection</span></a> <a class="link" href="pango-Bidirectional-Text.html#pango-unichar-direction" title="pango_unichar_direction ()">pango_unichar_direction</a> (<a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#gunichar"><span class="returnvalue">gunichar</span></a> ch);
63
<a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection"><span class="returnvalue">PangoDirection</span></a> <a class="link" href="pango-Bidirectional-Text.html#pango-find-base-dir" title="pango_find_base_dir ()">pango_find_base_dir</a> (const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *text,
64
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> length);
65
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="pango-Bidirectional-Text.html#pango-get-mirror-char" title="pango_get_mirror_char ()">pango_get_mirror_char</a> (<a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#gunichar"><span class="returnvalue">gunichar</span></a> ch,
66
<a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#gunichar"><span class="returnvalue">gunichar</span></a> *mirrored_ch);
41
<a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection"><span class="returnvalue">PangoDirection</span></a> <a class="link" href="pango-Bidirectional-Text.html#pango-unichar-direction" title="pango_unichar_direction ()">pango_unichar_direction</a> (<em class="parameter"><code><span class="type">gunichar</span> ch</code></em>);
42
<a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection"><span class="returnvalue">PangoDirection</span></a> <a class="link" href="pango-Bidirectional-Text.html#pango-find-base-dir" title="pango_find_base_dir ()">pango_find_base_dir</a> (<em class="parameter"><code>const <span class="type">gchar</span> *text</code></em>,
43
<em class="parameter"><code><span class="type">gint</span> length</code></em>);
44
<span class="returnvalue">gboolean</span> <a class="link" href="pango-Bidirectional-Text.html#pango-get-mirror-char" title="pango_get_mirror_char ()">pango_get_mirror_char</a> (<em class="parameter"><code><span class="type">gunichar</span> ch</code></em>,
45
<em class="parameter"><code><span class="type">gunichar</span> *mirrored_ch</code></em>);
67
46
enum <a class="link" href="pango-Bidirectional-Text.html#PangoBidiType" title="enum PangoBidiType">PangoBidiType</a>;
68
<a class="link" href="pango-Bidirectional-Text.html#PangoBidiType" title="enum PangoBidiType"><span class="returnvalue">PangoBidiType</span></a> <a class="link" href="pango-Bidirectional-Text.html#pango-bidi-type-for-unichar" title="pango_bidi_type_for_unichar ()">pango_bidi_type_for_unichar</a> (<a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#gunichar"><span class="returnvalue">gunichar</span></a> ch);
47
<a class="link" href="pango-Bidirectional-Text.html#PangoBidiType" title="enum PangoBidiType"><span class="returnvalue">PangoBidiType</span></a> <a class="link" href="pango-Bidirectional-Text.html#pango-bidi-type-for-unichar" title="pango_bidi_type_for_unichar ()">pango_bidi_type_for_unichar</a> (<em class="parameter"><code><span class="type">gunichar</span> ch</code></em>);
71
<div class="refsect1" title="Description">
50
<div class="refsect1">
72
51
<a name="pango-Bidirectional-Text.description"></a><h2>Description</h2>
74
53
Pango supports bidirectional text (like Arabic and Hebrew) automatically.
113
92
values come from an earlier interpretation of this
114
93
enumeration as the writing direction of a block of
115
94
text and are no longer used; See <a class="link" href="pango-Vertical-Text.html#PangoGravity" title="enum PangoGravity"><span class="type">PangoGravity</span></a> for how
116
vertical text is handled in Pango.</p>
95
vertical text is handled in Pango.
117
97
<div class="variablelist"><table border="0">
118
98
<col align="left" valign="top">
121
101
<td><p><a name="PANGO-DIRECTION-LTR:CAPS"></a><span class="term"><code class="literal">PANGO_DIRECTION_LTR</code></span></p></td>
122
<td> A strong left-to-right direction
102
<td>A strong left-to-right direction
126
106
<td><p><a name="PANGO-DIRECTION-RTL:CAPS"></a><span class="term"><code class="literal">PANGO_DIRECTION_RTL</code></span></p></td>
127
<td> A strong right-to-left direction
107
<td>A strong right-to-left direction
131
111
<td><p><a name="PANGO-DIRECTION-TTB-LTR:CAPS"></a><span class="term"><code class="literal">PANGO_DIRECTION_TTB_LTR</code></span></p></td>
132
<td> Deprecated value; treated the
112
<td>Deprecated value; treated the
133
113
same as <a class="link" href="pango-Bidirectional-Text.html#PANGO-DIRECTION-RTL:CAPS"><code class="literal">PANGO_DIRECTION_RTL</code></a>.
137
117
<td><p><a name="PANGO-DIRECTION-TTB-RTL:CAPS"></a><span class="term"><code class="literal">PANGO_DIRECTION_TTB_RTL</code></span></p></td>
138
<td> Deprecated value; treated the
118
<td>Deprecated value; treated the
139
119
same as <a class="link" href="pango-Bidirectional-Text.html#PANGO-DIRECTION-LTR:CAPS"><code class="literal">PANGO_DIRECTION_LTR</code></a>
143
123
<td><p><a name="PANGO-DIRECTION-WEAK-LTR:CAPS"></a><span class="term"><code class="literal">PANGO_DIRECTION_WEAK_LTR</code></span></p></td>
144
<td> A weak left-to-right direction
124
<td>A weak left-to-right direction
148
128
<td><p><a name="PANGO-DIRECTION-WEAK-RTL:CAPS"></a><span class="term"><code class="literal">PANGO_DIRECTION_WEAK_RTL</code></span></p></td>
149
<td> A weak right-to-left direction
129
<td>A weak right-to-left direction
153
133
<td><p><a name="PANGO-DIRECTION-NEUTRAL:CAPS"></a><span class="term"><code class="literal">PANGO_DIRECTION_NEUTRAL</code></span></p></td>
154
<td> No direction specified
134
<td>No direction specified
161
<div class="refsect2" title="pango_unichar_direction ()">
141
<div class="refsect2">
162
142
<a name="pango-unichar-direction"></a><h3>pango_unichar_direction ()</h3>
163
<pre class="programlisting"><a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection"><span class="returnvalue">PangoDirection</span></a> pango_unichar_direction (<a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#gunichar"><span class="returnvalue">gunichar</span></a> ch);</pre>
143
<pre class="programlisting"><a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection"><span class="returnvalue">PangoDirection</span></a> pango_unichar_direction (<em class="parameter"><code><span class="type">gunichar</span> ch</code></em>);</pre>
165
145
Determines the inherent direction of a character; either
166
146
<a class="link" href="pango-Bidirectional-Text.html#PANGO-DIRECTION-LTR:CAPS"><code class="literal">PANGO_DIRECTION_LTR</code></a>, <a class="link" href="pango-Bidirectional-Text.html#PANGO-DIRECTION-RTL:CAPS"><code class="literal">PANGO_DIRECTION_RTL</code></a>, or
170
150
This function is useful to categorize characters into left-to-right
171
151
letters, right-to-left letters, and everything else. If full
172
152
Unicode bidirectional type of a character is needed,
173
<code class="function">pango_bidi_type_for_gunichar()</code> can be used instead.</p>
153
<code class="function">pango_bidi_type_for_gunichar()</code> can be used instead.
174
155
<div class="variablelist"><table border="0">
175
156
<col align="left" valign="top">
178
159
<td><p><span class="term"><em class="parameter"><code>ch</code></em> :</span></p></td>
179
<td> a Unicode character
160
<td>a Unicode character
191
<div class="refsect2" title="pango_find_base_dir ()">
172
<div class="refsect2">
192
173
<a name="pango-find-base-dir"></a><h3>pango_find_base_dir ()</h3>
193
<pre class="programlisting"><a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection"><span class="returnvalue">PangoDirection</span></a> pango_find_base_dir (const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *text,
194
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> length);</pre>
174
<pre class="programlisting"><a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection"><span class="returnvalue">PangoDirection</span></a> pango_find_base_dir (<em class="parameter"><code>const <span class="type">gchar</span> *text</code></em>,
175
<em class="parameter"><code><span class="type">gint</span> length</code></em>);</pre>
196
177
Searches a string the first character that has a strong
197
direction, according to the Unicode bidirectional algorithm.</p>
178
direction, according to the Unicode bidirectional algorithm.
198
180
<div class="variablelist"><table border="0">
199
181
<col align="left" valign="top">
202
184
<td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
203
<td> the text to process
185
<td>the text to process
207
189
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
208
<td> length of <em class="parameter"><code>text</code></em> in bytes (may be -1 if <em class="parameter"><code>text</code></em> is nul-terminated)
190
<td>length of <em class="parameter"><code>text</code></em> in bytes (may be -1 if <em class="parameter"><code>text</code></em> is nul-terminated)
220
202
<p class="since">Since 1.4</p>
223
<div class="refsect2" title="pango_get_mirror_char ()">
205
<div class="refsect2">
224
206
<a name="pango-get-mirror-char"></a><h3>pango_get_mirror_char ()</h3>
225
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> pango_get_mirror_char (<a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#gunichar"><span class="returnvalue">gunichar</span></a> ch,
226
<a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#gunichar"><span class="returnvalue">gunichar</span></a> *mirrored_ch);</pre>
227
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
207
<pre class="programlisting"><span class="returnvalue">gboolean</span> pango_get_mirror_char (<em class="parameter"><code><span class="type">gunichar</span> ch</code></em>,
208
<em class="parameter"><code><span class="type">gunichar</span> *mirrored_ch</code></em>);</pre>
209
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
228
210
<h3 class="title">Warning</h3>
229
211
<p><code class="literal">pango_get_mirror_char</code> is deprecated and should not be used in newly-written code.</p>
234
216
glyph, puts that character in the address pointed to by <em class="parameter"><code>mirrored_ch</code></em>.
237
Use <a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#g-unichar-get-mirror-char"><code class="function">g_unichar_get_mirror_char()</code></a> instead; the docs for that function
238
provide full details.</p>
219
Use <code class="function">g_unichar_get_mirror_char()</code> instead; the docs for that function
220
provide full details.
239
222
<div class="variablelist"><table border="0">
240
223
<col align="left" valign="top">
243
226
<td><p><span class="term"><em class="parameter"><code>ch</code></em> :</span></p></td>
244
<td> a Unicode character
227
<td>a Unicode character
248
231
<td><p><span class="term"><em class="parameter"><code>mirrored_ch</code></em> :</span></p></td>
249
<td> location to store the mirrored character
232
<td>location to store the mirrored character
253
236
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
254
<td> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>ch</code></em> has a mirrored character and <em class="parameter"><code>mirrored_ch</code></em> is
255
filled in, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
237
<td> <code class="literal">TRUE</code> if <em class="parameter"><code>ch</code></em> has a mirrored character and <em class="parameter"><code>mirrored_ch</code></em> is
238
filled in, <code class="literal">FALSE</code> otherwise
262
<div class="refsect2" title="enum PangoBidiType">
245
<div class="refsect2">
263
246
<a name="PangoBidiType"></a><h3>enum PangoBidiType</h3>
264
247
<pre class="programlisting">typedef enum {
265
248
/* Strong types */
292
275
The <a class="link" href="pango-Bidirectional-Text.html#PangoBidiType" title="enum PangoBidiType"><span class="type">PangoBidiType</span></a> type represents the bidirectional character
293
276
type of a Unicode character as specified by the
294
<a class="ulink" href="http://www.unicode.org/reports/tr9/" target="_top">Unicode bidirectional algorithm</a>.</p>
277
<a class="ulink" href="http://www.unicode.org/reports/tr9/" target="_top">Unicode bidirectional algorithm</a>.
295
279
<div class="variablelist"><table border="0">
296
280
<col align="left" valign="top">
299
283
<td><p><a name="PANGO-BIDI-TYPE-L:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_L</code></span></p></td>
304
288
<td><p><a name="PANGO-BIDI-TYPE-LRE:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_LRE</code></span></p></td>
305
<td> Left-to-Right Embedding
289
<td>Left-to-Right Embedding
309
293
<td><p><a name="PANGO-BIDI-TYPE-LRO:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_LRO</code></span></p></td>
310
<td> Left-to-Right Override
294
<td>Left-to-Right Override
314
298
<td><p><a name="PANGO-BIDI-TYPE-R:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_R</code></span></p></td>
319
303
<td><p><a name="PANGO-BIDI-TYPE-AL:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_AL</code></span></p></td>
320
<td> Right-to-Left Arabic
304
<td>Right-to-Left Arabic
324
308
<td><p><a name="PANGO-BIDI-TYPE-RLE:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_RLE</code></span></p></td>
325
<td> Right-to-Left Embedding
309
<td>Right-to-Left Embedding
329
313
<td><p><a name="PANGO-BIDI-TYPE-RLO:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_RLO</code></span></p></td>
330
<td> Right-to-Left Override
314
<td>Right-to-Left Override
334
318
<td><p><a name="PANGO-BIDI-TYPE-PDF:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_PDF</code></span></p></td>
335
<td> Pop Directional Format
319
<td>Pop Directional Format
339
323
<td><p><a name="PANGO-BIDI-TYPE-EN:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_EN</code></span></p></td>
344
328
<td><p><a name="PANGO-BIDI-TYPE-ES:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_ES</code></span></p></td>
345
<td> European Number Separator
329
<td>European Number Separator
349
333
<td><p><a name="PANGO-BIDI-TYPE-ET:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_ET</code></span></p></td>
350
<td> European Number Terminator
334
<td>European Number Terminator
354
338
<td><p><a name="PANGO-BIDI-TYPE-AN:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_AN</code></span></p></td>
359
343
<td><p><a name="PANGO-BIDI-TYPE-CS:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_CS</code></span></p></td>
360
<td> Common Number Separator
344
<td>Common Number Separator
364
348
<td><p><a name="PANGO-BIDI-TYPE-NSM:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_NSM</code></span></p></td>
369
353
<td><p><a name="PANGO-BIDI-TYPE-BN:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_BN</code></span></p></td>
370
<td> Boundary Neutral
374
358
<td><p><a name="PANGO-BIDI-TYPE-B:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_B</code></span></p></td>
375
<td> Paragraph Separator
359
<td>Paragraph Separator
379
363
<td><p><a name="PANGO-BIDI-TYPE-S:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_S</code></span></p></td>
380
<td> Segment Separator
364
<td>Segment Separator
384
368
<td><p><a name="PANGO-BIDI-TYPE-WS:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_WS</code></span></p></td>
389
373
<td><p><a name="PANGO-BIDI-TYPE-ON:CAPS"></a><span class="term"><code class="literal">PANGO_BIDI_TYPE_ON</code></span></p></td>
395
379
<p class="since">Since 1.22</p>
398
<div class="refsect2" title="pango_bidi_type_for_unichar ()">
382
<div class="refsect2">
399
383
<a name="pango-bidi-type-for-unichar"></a><h3>pango_bidi_type_for_unichar ()</h3>
400
<pre class="programlisting"><a class="link" href="pango-Bidirectional-Text.html#PangoBidiType" title="enum PangoBidiType"><span class="returnvalue">PangoBidiType</span></a> pango_bidi_type_for_unichar (<a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#gunichar"><span class="returnvalue">gunichar</span></a> ch);</pre>
384
<pre class="programlisting"><a class="link" href="pango-Bidirectional-Text.html#PangoBidiType" title="enum PangoBidiType"><span class="returnvalue">PangoBidiType</span></a> pango_bidi_type_for_unichar (<em class="parameter"><code><span class="type">gunichar</span> ch</code></em>);</pre>
402
386
Determines the normative bidirectional character type of a
403
387
character, as specified in the Unicode Character Database.
406
390
A simplified version of this function is available as
407
<code class="function">pango_unichar_get_direction()</code>.</p>
391
<code class="function">pango_unichar_get_direction()</code>.
408
393
<div class="variablelist"><table border="0">
409
394
<col align="left" valign="top">
412
397
<td><p><span class="term"><em class="parameter"><code>ch</code></em> :</span></p></td>
413
<td> a Unicode character
398
<td>a Unicode character