This file is indexed.

/usr/share/doc/libpango1.0-doc/pango/pango-Vertical-Text.html is in libpango1.0-doc 1.30.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Vertical Text</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Pango Reference Manual">
<link rel="up" href="pango.html" title="Basic Pango Interfaces">
<link rel="prev" href="pango-Bidirectional-Text.html" title="Bidirectional Text">
<link rel="next" href="rendering.html" title="Rendering with Pango">
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="pango-Bidirectional-Text.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="pango.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Pango Reference Manual</th>
<td><a accesskey="n" href="rendering.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#pango-Vertical-Text.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#pango-Vertical-Text.description" class="shortcut">Description</a>
                   | 
                  <a href="#pango-Vertical-Text.object-hierarchy" class="shortcut">Object Hierarchy</a>
</td></tr>
</table>
<div class="refentry">
<a name="pango-Vertical-Text"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="pango-Vertical-Text.top_of_page"></a>Vertical Text</span></h2>
<p>Vertical Text — Laying text out in vertical directions</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="pango-Vertical-Text.synopsis"></a><h2>Synopsis</h2>
<a name="PangoGravity"></a><a name="PangoGravityHint"></a><pre class="synopsis">enum                <a class="link" href="pango-Vertical-Text.html#PangoGravity-enum" title="enum PangoGravity">PangoGravity</a>;
enum                <a class="link" href="pango-Vertical-Text.html#PangoGravityHint-enum" title="enum PangoGravityHint">PangoGravityHint</a>;
#define             <a class="link" href="pango-Vertical-Text.html#PANGO-GRAVITY-IS-VERTICAL:CAPS" title="PANGO_GRAVITY_IS_VERTICAL()">PANGO_GRAVITY_IS_VERTICAL</a>           (gravity)
<a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="returnvalue">PangoGravity</span></a>        <a class="link" href="pango-Vertical-Text.html#pango-gravity-get-for-matrix" title="pango_gravity_get_for_matrix ()">pango_gravity_get_for_matrix</a>        (<em class="parameter"><code>const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix"><span class="type">PangoMatrix</span></a> *matrix</code></em>);
<a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="returnvalue">PangoGravity</span></a>        <a class="link" href="pango-Vertical-Text.html#pango-gravity-get-for-script" title="pango_gravity_get_for_script ()">pango_gravity_get_for_script</a>        (<em class="parameter"><code><a class="link" href="pango-Scripts-and-Languages.html#PangoScript"><span class="type">PangoScript</span></a> script</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> base_gravity</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pango-Vertical-Text.html#PangoGravityHint"><span class="type">PangoGravityHint</span></a> hint</code></em>);
<a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="returnvalue">PangoGravity</span></a>        <a class="link" href="pango-Vertical-Text.html#pango-gravity-get-for-script-and-width" title="pango_gravity_get_for_script_and_width ()">pango_gravity_get_for_script_and_width</a>
                                                        (<em class="parameter"><code><a class="link" href="pango-Scripts-and-Languages.html#PangoScript"><span class="type">PangoScript</span></a> script</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> wide</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> base_gravity</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pango-Vertical-Text.html#PangoGravityHint"><span class="type">PangoGravityHint</span></a> hint</code></em>);
<span class="returnvalue">double</span>              <a class="link" href="pango-Vertical-Text.html#pango-gravity-to-rotation" title="pango_gravity_to_rotation ()">pango_gravity_to_rotation</a>           (<em class="parameter"><code><a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> gravity</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="pango-Vertical-Text.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  GEnum
   +----PangoGravity
</pre>
<pre class="synopsis">
  GEnum
   +----PangoGravityHint
</pre>
</div>
<div class="refsect1">
<a name="pango-Vertical-Text.description"></a><h2>Description</h2>
<p>
Since 1.16, Pango is able to correctly lay vertical text out.  In fact, it can
set layouts of mixed vertical and non-vertical text.  This section describes
the types used for setting vertical text parameters.
</p>
<p>
The way this is implemented is through the concept of
<em class="firstterm">gravity</em>.  Gravity of normal Latin text is south.  A
gravity value of east means that glyphs will be rotated ninety degrees
counterclockwise.  So, to render vertical text one needs to set the gravity
and rotate the layout using the matrix machinery already in place.  This has
the huge advantage that most algorithms working on a <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> do not need
any change as the assumption that lines run in the X direction and stack in
the Y direction holds even for vertical text layouts.
</p>
<p>
Applications should only need to set base gravity on <a class="link" href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> in use, and
let Pango decide the gravity assigned to each run of text.  This automatically
handles text with mixed scripts.  A very common use is to set the context base
gravity to auto using <a class="link" href="pango-Text-Processing.html#pango-context-set-base-gravity" title="pango_context_set_base_gravity ()"><code class="function">pango_context_set_base_gravity()</code></a>
and rotate the layout normally.  Pango will make sure that
Asian languages take the right form, while other scripts are rotated normally.
</p>
<p>
The correct way to set gravity on a layout is to set it on the context
associated with it using <a class="link" href="pango-Text-Processing.html#pango-context-set-base-gravity" title="pango_context_set_base_gravity ()"><code class="function">pango_context_set_base_gravity()</code></a>.  The context
of a layout can be accessed using <a class="link" href="pango-Layout-Objects.html#pango-layout-get-context" title="pango_layout_get_context ()"><code class="function">pango_layout_get_context()</code></a>.  The currently
set base gravity of the context can be accessed using
<a class="link" href="pango-Text-Processing.html#pango-context-get-base-gravity" title="pango_context_get_base_gravity ()"><code class="function">pango_context_get_base_gravity()</code></a> and the <em class="firstterm">resolved</em>
gravity of it using <a class="link" href="pango-Text-Processing.html#pango-context-get-gravity" title="pango_context_get_gravity ()"><code class="function">pango_context_get_gravity()</code></a>.  The resolved gravity is
the same as the base gravity for the most part, except that if the base
gravity is set to <a class="link" href="pango-Vertical-Text.html#PANGO-GRAVITY-AUTO:CAPS"><code class="literal">PANGO_GRAVITY_AUTO</code></a>, the resolved gravity will depend
on the current matrix set on context, and is derived using
<a class="link" href="pango-Vertical-Text.html#pango-gravity-get-for-matrix" title="pango_gravity_get_for_matrix ()"><code class="function">pango_gravity_get_for_matrix()</code></a>.
</p>
<p>
The next thing an application may want to set on the context is the
<em class="firstterm">gravity hint</em>.  A <a class="link" href="pango-Vertical-Text.html#PangoGravityHint"><span class="type">PangoGravityHint</span></a> instructs how
different scripts should react to the set base gravity.
</p>
<p>
Font descriptions have a gravity property too, that can be set using
<a class="link" href="pango-Fonts.html#pango-font-description-set-gravity" title="pango_font_description_set_gravity ()"><code class="function">pango_font_description_set_gravity()</code></a> and accessed using
<a class="link" href="pango-Fonts.html#pango-font-description-get-gravity" title="pango_font_description_get_gravity ()"><code class="function">pango_font_description_get_gravity()</code></a>.  However, those are rarely useful
from application code and are mainly used by <a class="link" href="pango-Layout-Objects.html#PangoLayout"><span class="type">PangoLayout</span></a> internally.
</p>
<p>
Last but not least, one can create <a class="link" href="pango-Text-Attributes.html#PangoAttribute" title="struct PangoAttribute"><span class="type">PangoAttribute</span></a>s for gravity
and gravity hint using <a class="link" href="pango-Text-Attributes.html#pango-attr-gravity-new" title="pango_attr_gravity_new ()"><code class="function">pango_attr_gravity_new()</code></a> and
<a class="link" href="pango-Text-Attributes.html#pango-attr-gravity-hint-new" title="pango_attr_gravity_hint_new ()"><code class="function">pango_attr_gravity_hint_new()</code></a>.
</p>
</div>
<div class="refsect1">
<a name="pango-Vertical-Text.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="PangoGravity-enum"></a><h3>enum PangoGravity</h3>
<pre class="programlisting">typedef enum {
  PANGO_GRAVITY_SOUTH,
  PANGO_GRAVITY_EAST,
  PANGO_GRAVITY_NORTH,
  PANGO_GRAVITY_WEST,
  PANGO_GRAVITY_AUTO
} PangoGravity;
</pre>
<p>
The <a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> type represents the orientation of glyphs in a segment
of text.  This is useful when rendering vertical text layouts.  In
those situations, the layout is rotated using a non-identity PangoMatrix,
and then glyph orientation is controlled using <a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a>.
Not every value in this enumeration makes sense for every usage of
<a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a>; for example, <a class="link" href="pango-Vertical-Text.html#PANGO-GRAVITY-AUTO:CAPS"><code class="literal">PANGO_GRAVITY_AUTO</code></a> only can be passed to
<a class="link" href="pango-Text-Processing.html#pango-context-set-base-gravity" title="pango_context_set_base_gravity ()"><code class="function">pango_context_set_base_gravity()</code></a> and can only be returned by
<a class="link" href="pango-Text-Processing.html#pango-context-get-base-gravity" title="pango_context_get_base_gravity ()"><code class="function">pango_context_get_base_gravity()</code></a>.
</p>
<p>
See also: <a class="link" href="pango-Vertical-Text.html#PangoGravityHint"><span class="type">PangoGravityHint</span></a>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="PANGO-GRAVITY-SOUTH:CAPS"></a><span class="term"><code class="literal">PANGO_GRAVITY_SOUTH</code></span></p></td>
<td>Glyphs stand upright (default)
</td>
</tr>
<tr>
<td><p><a name="PANGO-GRAVITY-EAST:CAPS"></a><span class="term"><code class="literal">PANGO_GRAVITY_EAST</code></span></p></td>
<td>Glyphs are rotated 90 degrees clockwise
</td>
</tr>
<tr>
<td><p><a name="PANGO-GRAVITY-NORTH:CAPS"></a><span class="term"><code class="literal">PANGO_GRAVITY_NORTH</code></span></p></td>
<td>Glyphs are upside-down
</td>
</tr>
<tr>
<td><p><a name="PANGO-GRAVITY-WEST:CAPS"></a><span class="term"><code class="literal">PANGO_GRAVITY_WEST</code></span></p></td>
<td>Glyphs are rotated 90 degrees counter-clockwise
</td>
</tr>
<tr>
<td><p><a name="PANGO-GRAVITY-AUTO:CAPS"></a><span class="term"><code class="literal">PANGO_GRAVITY_AUTO</code></span></p></td>
<td>Gravity is resolved from the context matrix
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.16</p>
</div>
<hr>
<div class="refsect2">
<a name="PangoGravityHint-enum"></a><h3>enum PangoGravityHint</h3>
<pre class="programlisting">typedef enum {
  PANGO_GRAVITY_HINT_NATURAL,
  PANGO_GRAVITY_HINT_STRONG,
  PANGO_GRAVITY_HINT_LINE
} PangoGravityHint;
</pre>
<p>
The <a class="link" href="pango-Vertical-Text.html#PangoGravityHint"><span class="type">PangoGravityHint</span></a> defines how horizontal scripts should behave in a
vertical context.  That is, English excerpt in a vertical paragraph for
example.
</p>
<p>
See <a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="PANGO-GRAVITY-HINT-NATURAL:CAPS"></a><span class="term"><code class="literal">PANGO_GRAVITY_HINT_NATURAL</code></span></p></td>
<td>scripts will take their natural gravity based
on the base gravity and the script.  This is the default.
</td>
</tr>
<tr>
<td><p><a name="PANGO-GRAVITY-HINT-STRONG:CAPS"></a><span class="term"><code class="literal">PANGO_GRAVITY_HINT_STRONG</code></span></p></td>
<td>always use the base gravity set, regardless of
the script.
</td>
</tr>
<tr>
<td><p><a name="PANGO-GRAVITY-HINT-LINE:CAPS"></a><span class="term"><code class="literal">PANGO_GRAVITY_HINT_LINE</code></span></p></td>
<td>for scripts not in their natural direction (eg.
Latin in East gravity), choose per-script gravity such that every script
respects the line progression.  This means, Latin and Arabic will take
opposite gravities and both flow top-to-bottom for example.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.16</p>
</div>
<hr>
<div class="refsect2">
<a name="PANGO-GRAVITY-IS-VERTICAL:CAPS"></a><h3>PANGO_GRAVITY_IS_VERTICAL()</h3>
<pre class="programlisting">#define             PANGO_GRAVITY_IS_VERTICAL(gravity)</pre>
<p>
Whether a <a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> represents vertical writing directions.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gravity</code></em> :</span></p></td>
<td>the <a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> to check</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<code class="literal">TRUE</code> if <em class="parameter"><code>gravity</code></em> is <a class="link" href="pango-Vertical-Text.html#PANGO-GRAVITY-EAST:CAPS"><code class="literal">PANGO_GRAVITY_EAST</code></a> or <a class="link" href="pango-Vertical-Text.html#PANGO-GRAVITY-WEST:CAPS"><code class="literal">PANGO_GRAVITY_WEST</code></a>,
<code class="literal">FALSE</code> otherwise.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.16</p>
</div>
<hr>
<div class="refsect2">
<a name="pango-gravity-get-for-matrix"></a><h3>pango_gravity_get_for_matrix ()</h3>
<pre class="programlisting"><a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="returnvalue">PangoGravity</span></a>        pango_gravity_get_for_matrix        (<em class="parameter"><code>const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix"><span class="type">PangoMatrix</span></a> *matrix</code></em>);</pre>
<p>
Finds the gravity that best matches the rotation component
in a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix"><span class="type">PangoMatrix</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>matrix</code></em> :</span></p></td>
<td>a <a class="link" href="pango-Glyph-Storage.html#PangoMatrix"><span class="type">PangoMatrix</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the gravity of <em class="parameter"><code>matrix</code></em>, which will never be
<a class="link" href="pango-Vertical-Text.html#PANGO-GRAVITY-AUTO:CAPS"><code class="literal">PANGO_GRAVITY_AUTO</code></a>, or <a class="link" 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 href="/home/mclasen/gnome/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.16</p>
</div>
<hr>
<div class="refsect2">
<a name="pango-gravity-get-for-script"></a><h3>pango_gravity_get_for_script ()</h3>
<pre class="programlisting"><a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="returnvalue">PangoGravity</span></a>        pango_gravity_get_for_script        (<em class="parameter"><code><a class="link" href="pango-Scripts-and-Languages.html#PangoScript"><span class="type">PangoScript</span></a> script</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> base_gravity</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pango-Vertical-Text.html#PangoGravityHint"><span class="type">PangoGravityHint</span></a> hint</code></em>);</pre>
<p>
Based on the script, base gravity, and hint, returns actual gravity
to use in laying out a single <a class="link" href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a>.
</p>
<p>
If <em class="parameter"><code>base_gravity</code></em> is <a class="link" href="pango-Vertical-Text.html#PANGO-GRAVITY-AUTO:CAPS"><code class="literal">PANGO_GRAVITY_AUTO</code></a>, it is first replaced with the
preferred gravity of <em class="parameter"><code>script</code></em>.  To get the preferred gravity of a script,
pass <a class="link" href="pango-Vertical-Text.html#PANGO-GRAVITY-AUTO:CAPS"><code class="literal">PANGO_GRAVITY_AUTO</code></a> and <a class="link" href="pango-Vertical-Text.html#PANGO-GRAVITY-HINT-STRONG:CAPS"><code class="literal">PANGO_GRAVITY_HINT_STRONG</code></a> in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>script</code></em> :</span></p></td>
<td>
<a class="link" href="pango-Scripts-and-Languages.html#PangoScript"><span class="type">PangoScript</span></a> to query</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>base_gravity</code></em> :</span></p></td>
<td>base gravity of the paragraph</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hint</code></em> :</span></p></td>
<td>orientation hint</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>resolved gravity suitable to use for a run of text
with <em class="parameter"><code>script</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.16</p>
</div>
<hr>
<div class="refsect2">
<a name="pango-gravity-get-for-script-and-width"></a><h3>pango_gravity_get_for_script_and_width ()</h3>
<pre class="programlisting"><a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="returnvalue">PangoGravity</span></a>        pango_gravity_get_for_script_and_width
                                                        (<em class="parameter"><code><a class="link" href="pango-Scripts-and-Languages.html#PangoScript"><span class="type">PangoScript</span></a> script</code></em>,
                                                         <em class="parameter"><code><span class="type">gboolean</span> wide</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> base_gravity</code></em>,
                                                         <em class="parameter"><code><a class="link" href="pango-Vertical-Text.html#PangoGravityHint"><span class="type">PangoGravityHint</span></a> hint</code></em>);</pre>
<p>
Based on the script, East Asian width, base gravity, and hint,
returns actual gravity to use in laying out a single character
or <a class="link" href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a>.
</p>
<p>
This function is similar to <a class="link" href="pango-Vertical-Text.html#pango-gravity-get-for-script" title="pango_gravity_get_for_script ()"><code class="function">pango_gravity_get_for_script()</code></a> except
that this function makes a distinction between narrow/half-width and
wide/full-width characters also.  Wide/full-width characters always
stand <span style="color: red">&lt;emph&gt;upright&lt;/emph&gt;</span>, that is, they always take the base gravity,
whereas narrow/full-width characters are always rotated in vertical
context.
</p>
<p>
If <em class="parameter"><code>base_gravity</code></em> is <a class="link" href="pango-Vertical-Text.html#PANGO-GRAVITY-AUTO:CAPS"><code class="literal">PANGO_GRAVITY_AUTO</code></a>, it is first replaced with the
preferred gravity of <em class="parameter"><code>script</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>script</code></em> :</span></p></td>
<td>
<a class="link" href="pango-Scripts-and-Languages.html#PangoScript"><span class="type">PangoScript</span></a> to query</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>wide</code></em> :</span></p></td>
<td>
<code class="literal">TRUE</code> for wide characters as returned by <code class="function">g_unichar_iswide()</code>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>base_gravity</code></em> :</span></p></td>
<td>base gravity of the paragraph</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>hint</code></em> :</span></p></td>
<td>orientation hint</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>resolved gravity suitable to use for a run of text
with <em class="parameter"><code>script</code></em> and <em class="parameter"><code>wide</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.26</p>
</div>
<hr>
<div class="refsect2">
<a name="pango-gravity-to-rotation"></a><h3>pango_gravity_to_rotation ()</h3>
<pre class="programlisting"><span class="returnvalue">double</span>              pango_gravity_to_rotation           (<em class="parameter"><code><a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> gravity</code></em>);</pre>
<p>
Converts a <a class="link" href="pango-Vertical-Text.html#PangoGravity"><span class="type">PangoGravity</span></a> value to its natural rotation in radians.
<em class="parameter"><code>gravity</code></em> should not be <a class="link" href="pango-Vertical-Text.html#PANGO-GRAVITY-AUTO:CAPS"><code class="literal">PANGO_GRAVITY_AUTO</code></a>.
</p>
<p>
Note that <a class="link" href="pango-Glyph-Storage.html#pango-matrix-rotate" title="pango_matrix_rotate ()"><code class="function">pango_matrix_rotate()</code></a> takes angle in degrees, not radians.
So, to call <a class="link" href="pango-Glyph-Storage.html#pango-matrix-rotate" title="pango_matrix_rotate ()"><code class="function">pango_matrix_rotate()</code></a> with the output of this function
you should multiply it by (180. / G_PI).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>gravity</code></em> :</span></p></td>
<td>gravity to query</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the rotation value corresponding to <em class="parameter"><code>gravity</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 1.16</p>
</div>
</div>
<div class="refsect1">
<a name="pango-Vertical-Text.see-also"></a><h2>See Also</h2>
<p>
<a class="link" href="pango-Text-Processing.html#pango-context-get-base-gravity" title="pango_context_get_base_gravity ()"><code class="function">pango_context_get_base_gravity()</code></a>,
<a class="link" href="pango-Text-Processing.html#pango-context-set-base-gravity" title="pango_context_set_base_gravity ()"><code class="function">pango_context_set_base_gravity()</code></a>,
<a class="link" href="pango-Text-Processing.html#pango-context-get-gravity" title="pango_context_get_gravity ()"><code class="function">pango_context_get_gravity()</code></a>,
<a class="link" href="pango-Text-Processing.html#pango-context-get-gravity-hint" title="pango_context_get_gravity_hint ()"><code class="function">pango_context_get_gravity_hint()</code></a>,
<a class="link" href="pango-Text-Processing.html#pango-context-set-gravity-hint" title="pango_context_set_gravity_hint ()"><code class="function">pango_context_set_gravity_hint()</code></a>,
<a class="link" href="pango-Fonts.html#pango-font-description-set-gravity" title="pango_font_description_set_gravity ()"><code class="function">pango_font_description_set_gravity()</code></a>,
<a class="link" href="pango-Fonts.html#pango-font-description-get-gravity" title="pango_font_description_get_gravity ()"><code class="function">pango_font_description_get_gravity()</code></a>,
<a class="link" href="pango-Text-Attributes.html#pango-attr-gravity-new" title="pango_attr_gravity_new ()"><code class="function">pango_attr_gravity_new()</code></a>,
<a class="link" href="pango-Text-Attributes.html#pango-attr-gravity-hint-new" title="pango_attr_gravity_hint_new ()"><code class="function">pango_attr_gravity_hint_new()</code></a>
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18.1</div>
</body>
</html>