~ubuntu-branches/ubuntu/karmic/pango1.0/karmic-security

« back to all changes in this revision

Viewing changes to docs/html/pango-Vertical-Text.html

Tags: upstream-1.15.4
ImportĀ upstreamĀ versionĀ 1.15.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
2
<html>
 
3
<head>
 
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
 
5
<title>Vertical Text</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
 
7
<link rel="start" href="index.html" title="Pango Reference Manual">
 
8
<link rel="up" href="pango.html" title="Basic Pango Interfaces">
 
9
<link rel="prev" href="pango-Scripts.html" title="Scripts">
 
10
<link rel="next" href="rendering.html" title="Rendering with Pango">
 
11
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
 
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="index" href="ix01.html" title="Index">
 
18
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
 
19
<link rel="index" href="ix03.html" title="Index of new symbols in 1.2">
 
20
<link rel="index" href="ix04.html" title="Index of new symbols in 1.4">
 
21
<link rel="index" href="ix05.html" title="Index of new symbols in 1.6">
 
22
<link rel="index" href="ix06.html" title="Index of new symbols in 1.8">
 
23
<link rel="index" href="ix07.html" title="Index of new symbols in 1.10">
 
24
<link rel="index" href="ix08.html" title="Index of new symbols in 1.12">
 
25
<link rel="index" href="ix09.html" title="Index of new symbols in 1.14">
 
26
<link rel="index" href="ix10.html" title="Index of new symbols in 1.16">
 
27
</head>
 
28
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
29
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
30
<tr valign="middle">
 
31
<td><a accesskey="p" href="pango-Scripts.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
32
<td><a accesskey="u" href="pango.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
33
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
34
<th width="100%" align="center">Pango Reference Manual</th>
 
35
<td><a accesskey="n" href="rendering.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
36
</tr>
 
37
<tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>
 
38
                  &#160;|&#160;
 
39
                  <a href="#desc" class="shortcut">Description</a></nobr></td></tr>
 
40
</table>
 
41
<div class="refentry" lang="en">
 
42
<a name="pango-Vertical-Text"></a><div class="titlepage"></div>
 
43
<div class="refnamediv"><table width="100%"><tr>
 
44
<td valign="top">
 
45
<h2><span class="refentrytitle"><a name="top_of_page"></a>Vertical Text</span></h2>
 
46
<p>Vertical Text &#8212; Laying text out in vertical directions</p>
 
47
</td>
 
48
<td valign="top" align="right"></td>
 
49
</tr></table></div>
 
50
<div class="refsynopsisdiv">
 
51
<a name="synopsis"></a><h2>Synopsis</h2>
 
52
<pre class="synopsis">
 
53
 
 
54
 
 
55
 
 
56
enum        <a href="pango-Vertical-Text.html#PangoGravity">PangoGravity</a>;
 
57
#define     <a href="pango-Vertical-Text.html#PANGO-TYPE-GRAVITY:CAPS">PANGO_TYPE_GRAVITY</a>
 
58
enum        <a href="pango-Vertical-Text.html#PangoGravityHint">PangoGravityHint</a>;
 
59
#define     <a href="pango-Vertical-Text.html#PANGO-TYPE-GRAVITY-HINT:CAPS">PANGO_TYPE_GRAVITY_HINT</a>
 
60
#define     <a href="pango-Vertical-Text.html#PANGO-GRAVITY-IS-VERTICAL:CAPS">PANGO_GRAVITY_IS_VERTICAL</a>       (gravity)
 
61
<a href="pango-Vertical-Text.html#PangoGravity">PangoGravity</a> <a href="pango-Vertical-Text.html#pango-gravity-get-for-matrix">pango_gravity_get_for_matrix</a>   (const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix);
 
62
<a href="pango-Vertical-Text.html#PangoGravity">PangoGravity</a> <a href="pango-Vertical-Text.html#pango-gravity-get-for-script">pango_gravity_get_for_script</a>   (<a href="pango-Scripts.html#PangoScript">PangoScript</a> script,
 
63
                                             <a href="pango-Vertical-Text.html#PangoGravity">PangoGravity</a> base_gravity,
 
64
                                             <a href="pango-Vertical-Text.html#PangoGravityHint">PangoGravityHint</a> hint);
 
65
 
 
66
</pre>
 
67
</div>
 
68
<div class="refsect1" lang="en">
 
69
<a name="desc"></a><h2>Description</h2>
 
70
<p>
 
71
Since 1.16, Pango is able to correctly lay vertical text out.  In fact, it can
 
72
set layouts of mixed vertical and non-vertical text.  This section describes
 
73
the types used for setting vertical text parameters.
 
74
</p>
 
75
</div>
 
76
<div class="refsect1" lang="en">
 
77
<a name="details"></a><h2>Details</h2>
 
78
<div class="refsect2" lang="en">
 
79
<a name="id3125692"></a><h3>
 
80
<a name="PangoGravity"></a>enum PangoGravity</h3>
 
81
<a class="indexterm" name="id3125705"></a><pre class="programlisting">typedef enum {
 
82
  PANGO_GRAVITY_SOUTH,
 
83
  PANGO_GRAVITY_EAST,
 
84
  PANGO_GRAVITY_NORTH,
 
85
  PANGO_GRAVITY_WEST,
 
86
  PANGO_GRAVITY_AUTO
 
87
} PangoGravity;
 
88
</pre>
 
89
<p>
 
90
The <a href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> type represents the orientation of glyphs in a segment
 
91
of text.  This is useful when rendering vertical text layouts.  In
 
92
those situations, the layout is rotated using a non-identity PangoMatrix,
 
93
and then glyph orientation is controlled using <a href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a>.
 
94
Not every value in this enumeration makes sense for every usage of
 
95
<a href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a>; for example, <a href="pango-Vertical-Text.html#PANGO-GRAVITY-AUTO:CAPS"><code class="literal">PANGO_GRAVITY_AUTO</code></a> only can be passed to
 
96
<a href="pango-Text-Processing.html#pango-context-set-base-gravity"><code class="function">pango_context_set_base_gravity()</code></a> and can only be returned by
 
97
<a href="pango-Text-Processing.html#pango-context-get-base-gravity"><code class="function">pango_context_get_base_gravity()</code></a>.
 
98
</p>
 
99
<p>
 
100
See also: <a href="pango-Vertical-Text.html#PangoGravityHint"><span class="type">PangoGravityHint</span></a></p>
 
101
<p>
 
102
 
 
103
</p>
 
104
<div class="variablelist"><table border="0">
 
105
<col align="left" valign="top">
 
106
<tbody>
 
107
<tr>
 
108
<td>
 
109
<span class="term"><a name="PANGO-GRAVITY-SOUTH:CAPS"></a><code class="literal">PANGO_GRAVITY_SOUTH</code></span></td>
 
110
<td> Glyphs stand upright (default)
 
111
</td>
 
112
</tr>
 
113
<tr>
 
114
<td>
 
115
<span class="term"><a name="PANGO-GRAVITY-EAST:CAPS"></a><code class="literal">PANGO_GRAVITY_EAST</code></span></td>
 
116
<td> Glyphs are rotated 90 degrees clockwise
 
117
</td>
 
118
</tr>
 
119
<tr>
 
120
<td>
 
121
<span class="term"><a name="PANGO-GRAVITY-NORTH:CAPS"></a><code class="literal">PANGO_GRAVITY_NORTH</code></span></td>
 
122
<td> Glyphs are upside-down
 
123
</td>
 
124
</tr>
 
125
<tr>
 
126
<td>
 
127
<span class="term"><a name="PANGO-GRAVITY-WEST:CAPS"></a><code class="literal">PANGO_GRAVITY_WEST</code></span></td>
 
128
<td> Glyphs are rotated 90 degrees counter-clockwise
 
129
</td>
 
130
</tr>
 
131
<tr>
 
132
<td>
 
133
<span class="term"><a name="PANGO-GRAVITY-AUTO:CAPS"></a><code class="literal">PANGO_GRAVITY_AUTO</code></span></td>
 
134
<td> Gravity is resolved from the context matrix
 
135
</td>
 
136
</tr>
 
137
</tbody>
 
138
</table></div>
 
139
<p>Since  1.16
 
140
</p>
 
141
</div>
 
142
<hr>
 
143
<div class="refsect2" lang="en">
 
144
<a name="id3125924"></a><h3>
 
145
<a name="PANGO-TYPE-GRAVITY:CAPS"></a>PANGO_TYPE_GRAVITY</h3>
 
146
<a class="indexterm" name="id3125937"></a><pre class="programlisting">#define PANGO_TYPE_GRAVITY (pango_gravity_get_type())
 
147
</pre>
 
148
<p>
 
149
The <a
 
150
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
 
151
><span class="type">GObject</span></a> type for <a href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a>.
 
152
</p>
 
153
</div>
 
154
<hr>
 
155
<div class="refsect2" lang="en">
 
156
<a name="id3125970"></a><h3>
 
157
<a name="PangoGravityHint"></a>enum PangoGravityHint</h3>
 
158
<a class="indexterm" name="id3125985"></a><pre class="programlisting">typedef enum {
 
159
  PANGO_GRAVITY_HINT_NATURAL,
 
160
  PANGO_GRAVITY_HINT_STRONG,
 
161
  PANGO_GRAVITY_HINT_LINE
 
162
} PangoGravityHint;
 
163
</pre>
 
164
<p>
 
165
The <a href="pango-Vertical-Text.html#PangoGravityHint"><span class="type">PangoGravityHint</span></a> defines how horizontal scripts should behave in a
 
166
vertical context.  That is, English excerpt in a vertical paragraph for
 
167
example.
 
168
</p>
 
169
<p>
 
170
See <a href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a>.</p>
 
171
<p>
 
172
 
 
173
</p>
 
174
<div class="variablelist"><table border="0">
 
175
<col align="left" valign="top">
 
176
<tbody>
 
177
<tr>
 
178
<td>
 
179
<span class="term"><a name="PANGO-GRAVITY-HINT-NATURAL:CAPS"></a><code class="literal">PANGO_GRAVITY_HINT_NATURAL</code></span></td>
 
180
<td> scripts will take their natural gravity based
 
181
on the base gravity and the script.  This is the default.
 
182
</td>
 
183
</tr>
 
184
<tr>
 
185
<td>
 
186
<span class="term"><a name="PANGO-GRAVITY-HINT-STRONG:CAPS"></a><code class="literal">PANGO_GRAVITY_HINT_STRONG</code></span></td>
 
187
<td> always use the base gravity set, regardless of
 
188
the script.
 
189
</td>
 
190
</tr>
 
191
<tr>
 
192
<td>
 
193
<span class="term"><a name="PANGO-GRAVITY-HINT-LINE:CAPS"></a><code class="literal">PANGO_GRAVITY_HINT_LINE</code></span></td>
 
194
<td> for scripts not in their natural direction (eg.
 
195
Latin in East gravity), choose per-script gravity such that every script
 
196
respects the line progression.  This means, Latin and Arabic will take
 
197
opposite gravities and both flow top-to-bottom for example.
 
198
</td>
 
199
</tr>
 
200
</tbody>
 
201
</table></div>
 
202
<p>Since  1.16
 
203
</p>
 
204
</div>
 
205
<hr>
 
206
<div class="refsect2" lang="en">
 
207
<a name="id3126112"></a><h3>
 
208
<a name="PANGO-TYPE-GRAVITY-HINT:CAPS"></a>PANGO_TYPE_GRAVITY_HINT</h3>
 
209
<a class="indexterm" name="id3126126"></a><pre class="programlisting">#define PANGO_TYPE_GRAVITY_HINT (pango_gravity_hint_get_type())
 
210
</pre>
 
211
<p>
 
212
The <a
 
213
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
 
214
><span class="type">GObject</span></a> type for <a href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a>.
 
215
</p>
 
216
</div>
 
217
<hr>
 
218
<div class="refsect2" lang="en">
 
219
<a name="id3126158"></a><h3>
 
220
<a name="PANGO-GRAVITY-IS-VERTICAL:CAPS"></a>PANGO_GRAVITY_IS_VERTICAL()</h3>
 
221
<a class="indexterm" name="id3126174"></a><pre class="programlisting">#define     PANGO_GRAVITY_IS_VERTICAL(gravity)</pre>
 
222
<p>
 
223
Whether a <a href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> represents vertical writing directions.</p>
 
224
<p>
 
225
 
 
226
</p>
 
227
<div class="variablelist"><table border="0">
 
228
<col align="left" valign="top">
 
229
<tbody><tr>
 
230
<td>
 
231
<span class="term"><em class="parameter"><code>gravity</code></em>&#160;:</span></td>
 
232
<td> the <a href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> to check
 
233
</td>
 
234
</tr></tbody>
 
235
</table></div>
 
236
<p>Since  1.16
 
237
</p>
 
238
</div>
 
239
<hr>
 
240
<div class="refsect2" lang="en">
 
241
<a name="id3126233"></a><h3>
 
242
<a name="pango-gravity-get-for-matrix"></a>pango_gravity_get_for_matrix ()</h3>
 
243
<a class="indexterm" name="id3126249"></a><pre class="programlisting"><a href="pango-Vertical-Text.html#PangoGravity">PangoGravity</a> pango_gravity_get_for_matrix   (const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix);</pre>
 
244
<p>
 
245
Finds the gravity that best matches the rotation component
 
246
in a <a href="pango-Glyph-Storage.html#PangoMatrix"><span class="type">PangoMatrix</span></a>.</p>
 
247
<p>
 
248
 
 
249
</p>
 
250
<div class="variablelist"><table border="0">
 
251
<col align="left" valign="top">
 
252
<tbody>
 
253
<tr>
 
254
<td>
 
255
<span class="term"><em class="parameter"><code>matrix</code></em>&#160;:</span></td>
 
256
<td> a <a href="pango-Glyph-Storage.html#PangoMatrix"><span class="type">PangoMatrix</span></a>
 
257
</td>
 
258
</tr>
 
259
<tr>
 
260
<td>
 
261
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
262
<td> the gravity of <em class="parameter"><code>matrix</code></em>, which will never be
 
263
<a href="pango-Vertical-Text.html#PANGO-GRAVITY-AUTO:CAPS"><code class="literal">PANGO_GRAVITY_AUTO</code></a>, or <a href="pango-Vertical-Text.html#PANGO-GRAVITY-SOUTH:CAPS"><code class="literal">PANGO_GRAVITY_SOUTH</code></a> if <em class="parameter"><code>matrix</code></em> is <a
 
264
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
 
265
><code class="literal">NULL</code></a>
 
266
 
 
267
</td>
 
268
</tr>
 
269
</tbody>
 
270
</table></div>
 
271
<p>Since  1.16
 
272
</p>
 
273
</div>
 
274
<hr>
 
275
<div class="refsect2" lang="en">
 
276
<a name="id3126376"></a><h3>
 
277
<a name="pango-gravity-get-for-script"></a>pango_gravity_get_for_script ()</h3>
 
278
<a class="indexterm" name="id3126391"></a><pre class="programlisting"><a href="pango-Vertical-Text.html#PangoGravity">PangoGravity</a> pango_gravity_get_for_script   (<a href="pango-Scripts.html#PangoScript">PangoScript</a> script,
 
279
                                             <a href="pango-Vertical-Text.html#PangoGravity">PangoGravity</a> base_gravity,
 
280
                                             <a href="pango-Vertical-Text.html#PangoGravityHint">PangoGravityHint</a> hint);</pre>
 
281
<p>
 
282
Based on the script, base gravity, and hint, returns actual gravity
 
283
to use in laying out a single <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a>.
 
284
</p>
 
285
<p>
 
286
If <em class="parameter"><code>base_gravity</code></em> is <a href="pango-Vertical-Text.html#PANGO-GRAVITY-AUTO:CAPS"><code class="literal">PANGO_GRAVITY_AUTO</code></a>, it is first replaced with the
 
287
preferred gravity of <em class="parameter"><code>script</code></em>.  To get the preferred gravity of a script,
 
288
pass <a href="pango-Vertical-Text.html#PANGO-GRAVITY-AUTO:CAPS"><code class="literal">PANGO_GRAVITY_AUTO</code></a> and <a href="pango-Vertical-Text.html#PANGO-GRAVITY-HINT-STRONG:CAPS"><code class="literal">PANGO_GRAVITY_HINT_STRONG</code></a> in.</p>
 
289
<p>
 
290
 
 
291
</p>
 
292
<div class="variablelist"><table border="0">
 
293
<col align="left" valign="top">
 
294
<tbody>
 
295
<tr>
 
296
<td>
 
297
<span class="term"><em class="parameter"><code>script</code></em>&#160;:</span></td>
 
298
<td> <a href="pango-Scripts.html#PangoScript"><span class="type">PangoScript</span></a> to query
 
299
</td>
 
300
</tr>
 
301
<tr>
 
302
<td>
 
303
<span class="term"><em class="parameter"><code>base_gravity</code></em>&#160;:</span></td>
 
304
<td> base gravity of the paragraph
 
305
</td>
 
306
</tr>
 
307
<tr>
 
308
<td>
 
309
<span class="term"><em class="parameter"><code>hint</code></em>&#160;:</span></td>
 
310
<td> orientation hint
 
311
</td>
 
312
</tr>
 
313
<tr>
 
314
<td>
 
315
<span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
316
<td> resolved gravity suitable to use for a run of text
 
317
 
 
318
</td>
 
319
</tr>
 
320
</tbody>
 
321
</table></div>
 
322
<p>Since  1.16
 
323
</p>
 
324
</div>
 
325
</div>
 
326
</div>
 
327
</body>
 
328
</html>