Git init
[external/pango1.0.git] / docs / html / pango-Miscellaneous-Utilities.html
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=UTF-8">
5 <title>Miscellaneous Utilities</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
7 <link rel="home" href="index.html" title="Pango Reference Manual">
8 <link rel="up" href="lowlevel.html" title="Low Level Functionality">
9 <link rel="prev" href="pango-Modules.html" title="Modules">
10 <link rel="next" href="pango-Version-Checking.html" title="Version Checking">
11 <meta name="generator" content="GTK-Doc V1.11 (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="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 </head>
34 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
35 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
36 <tr valign="middle">
37 <td><a accesskey="p" href="pango-Modules.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
38 <td><a accesskey="u" href="lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
39 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
40 <th width="100%" align="center">Pango Reference Manual</th>
41 <td><a accesskey="n" href="pango-Version-Checking.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
42 </tr>
43 <tr><td colspan="5" class="shortcuts">
44 <a href="#pango-Miscellaneous-Utilities.synopsis" class="shortcut">Top</a>
45                  | 
46                 <a href="#pango-Miscellaneous-Utilities.description" class="shortcut">Description</a>
47 </td></tr>
48 </table>
49 <div class="refentry" lang="en">
50 <a name="pango-Miscellaneous-Utilities"></a><div class="titlepage"></div>
51 <div class="refnamediv"><table width="100%"><tr>
52 <td valign="top">
53 <h2><span class="refentrytitle"><a name="pango-Miscellaneous-Utilities.top_of_page"></a>Miscellaneous Utilities</span></h2>
54 <p>Miscellaneous Utilities — Various convenience and utility functions</p>
55 </td>
56 <td valign="top" align="right"></td>
57 </tr></table></div>
58 <div class="refsynopsisdiv">
59 <a name="pango-Miscellaneous-Utilities.synopsis"></a><h2>Synopsis</h2>
60 <pre class="synopsis">
61 char **             <a class="link" href="pango-Miscellaneous-Utilities.html#pango-split-file-list" title="pango_split_file_list ()">pango_split_file_list</a>               (const char *str);
62 char *              <a class="link" href="pango-Miscellaneous-Utilities.html#pango-trim-string" title="pango_trim_string ()">pango_trim_string</a>                   (const char *str);
63 <a
64 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
65 >gint</a>                <a class="link" href="pango-Miscellaneous-Utilities.html#pango-read-line" title="pango_read_line ()">pango_read_line</a>                     (FILE *stream,
66                                                          <a
67 href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
68 >GString</a> *str);
69 <a
70 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
71 >gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-skip-space" title="pango_skip_space ()">pango_skip_space</a>                    (const char **pos);
72 <a
73 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
74 >gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-scan-word" title="pango_scan_word ()">pango_scan_word</a>                     (const char **pos,
75                                                          <a
76 href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
77 >GString</a> *out);
78 <a
79 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
80 >gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-scan-string" title="pango_scan_string ()">pango_scan_string</a>                   (const char **pos,
81                                                          <a
82 href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
83 >GString</a> *out);
84 <a
85 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
86 >gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-scan-int" title="pango_scan_int ()">pango_scan_int</a>                      (const char **pos,
87                                                          int *out);
88 char *              <a class="link" href="pango-Miscellaneous-Utilities.html#pango-config-key-get" title="pango_config_key_get ()">pango_config_key_get</a>                (const char *key);
89 void                <a class="link" href="pango-Miscellaneous-Utilities.html#pango-lookup-aliases" title="pango_lookup_aliases ()">pango_lookup_aliases</a>                (const char *fontname,
90                                                          char ***families,
91                                                          int *n_families);
92 <a
93 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
94 >gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-enum" title="pango_parse_enum ()">pango_parse_enum</a>                    (<a
95 href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"
96 >GType</a> type,
97                                                          const char *str,
98                                                          int *value,
99                                                          <a
100 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
101 >gboolean</a> warn,
102                                                          char **possible_values);
103 <a
104 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
105 >gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-style" title="pango_parse_style ()">pango_parse_style</a>                   (const char *str,
106                                                          <a class="link" href="pango-Fonts.html#PangoStyle" title="enum PangoStyle">PangoStyle</a> *style,
107                                                          <a
108 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
109 >gboolean</a> warn);
110 <a
111 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
112 >gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-variant" title="pango_parse_variant ()">pango_parse_variant</a>                 (const char *str,
113                                                          <a class="link" href="pango-Fonts.html#PangoVariant" title="enum PangoVariant">PangoVariant</a> *variant,
114                                                          <a
115 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
116 >gboolean</a> warn);
117 <a
118 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
119 >gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-weight" title="pango_parse_weight ()">pango_parse_weight</a>                  (const char *str,
120                                                          <a class="link" href="pango-Fonts.html#PangoWeight" title="enum PangoWeight">PangoWeight</a> *weight,
121                                                          <a
122 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
123 >gboolean</a> warn);
124 <a
125 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
126 >gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-stretch" title="pango_parse_stretch ()">pango_parse_stretch</a>                 (const char *str,
127                                                          <a class="link" href="pango-Fonts.html#PangoStretch" title="enum PangoStretch">PangoStretch</a> *stretch,
128                                                          <a
129 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
130 >gboolean</a> warn);
131 const char *        <a class="link" href="pango-Miscellaneous-Utilities.html#pango-get-sysconf-subdirectory" title="pango_get_sysconf_subdirectory ()">pango_get_sysconf_subdirectory</a>      (void);
132 const char *        <a class="link" href="pango-Miscellaneous-Utilities.html#pango-get-lib-subdirectory" title="pango_get_lib_subdirectory ()">pango_get_lib_subdirectory</a>          (void);
133 <a
134 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
135 >guint8</a> *            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-log2vis-get-embedding-levels" title="pango_log2vis_get_embedding_levels ()">pango_log2vis_get_embedding_levels</a>  (const <a
136 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
137 >gchar</a> *text,
138                                                          int length,
139                                                          <a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection">PangoDirection</a> *pbase_dir);
140 <a
141 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
142 >gboolean</a>            <a class="link" href="pango-Miscellaneous-Utilities.html#pango-is-zero-width" title="pango_is_zero_width ()">pango_is_zero_width</a>                 (<a
143 href="http://library.gnome.org/devel/glib/unstable/glib-Unicode-Manipulation.html#gunichar"
144 >gunichar</a> ch);
145 void                <a class="link" href="pango-Miscellaneous-Utilities.html#pango-quantize-line-geometry" title="pango_quantize_line_geometry ()">pango_quantize_line_geometry</a>        (int *thickness,
146                                                          int *position);
147 </pre>
148 </div>
149 <div class="refsect1" lang="en">
150 <a name="pango-Miscellaneous-Utilities.description"></a><h2>Description</h2>
151 <p>
152 The functions and utilities in this section are mostly used from Pango
153 backends and modules, but may be useful for other purposes too.
154 </p>
155 </div>
156 <div class="refsect1" lang="en">
157 <a name="pango-Miscellaneous-Utilities.details"></a><h2>Details</h2>
158 <div class="refsect2" lang="en">
159 <a name="pango-split-file-list"></a><h3>pango_split_file_list ()</h3>
160 <pre class="programlisting">char **             pango_split_file_list               (const char *str);</pre>
161 <p>
162 Splits a <a
163 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#G-SEARCHPATH-SEPARATOR--CAPS"
164 ><code class="literal">G_SEARCHPATH_SEPARATOR</code></a>-separated list of files, stripping
165 white space and substituting ~/ with $HOME/.</p>
166 <p>
167 </p>
168 <div class="variablelist"><table border="0">
169 <col align="left" valign="top">
170 <tbody>
171 <tr>
172 <td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
173 <td> a <a
174 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#G-SEARCHPATH-SEPARATOR--CAPS"
175 ><code class="literal">G_SEARCHPATH_SEPARATOR</code></a> separated list of filenames
176 </td>
177 </tr>
178 <tr>
179 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
180 <td> a list of strings to be freed with <a
181 href="http://library.gnome.org/devel/glib/unstable/glib-String-Utility-Functions.html#g-strfreev"
182 ><code class="function">g_strfreev()</code></a>
183 </td>
184 </tr>
185 </tbody>
186 </table></div>
187 </div>
188 <hr>
189 <div class="refsect2" lang="en">
190 <a name="pango-trim-string"></a><h3>pango_trim_string ()</h3>
191 <pre class="programlisting">char *              pango_trim_string                   (const char *str);</pre>
192 <p>
193 Trims leading and trailing whitespace from a string.</p>
194 <p>
195 </p>
196 <div class="variablelist"><table border="0">
197 <col align="left" valign="top">
198 <tbody>
199 <tr>
200 <td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
201 <td> a string
202 </td>
203 </tr>
204 <tr>
205 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
206 <td> A newly-allocated string that must be freed with <a
207 href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"
208 ><code class="function">g_free()</code></a>
209 </td>
210 </tr>
211 </tbody>
212 </table></div>
213 </div>
214 <hr>
215 <div class="refsect2" lang="en">
216 <a name="pango-read-line"></a><h3>pango_read_line ()</h3>
217 <pre class="programlisting"><a
218 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"
219 >gint</a>                pango_read_line                     (FILE *stream,
220                                                          <a
221 href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
222 >GString</a> *str);</pre>
223 <p>
224 Reads an entire line from a file into a buffer. Lines may
225 be delimited with '\n', '\r', '\n\r', or '\r\n'. The delimiter
226 is not written into the buffer. Text after a '#' character is treated as
227 a comment and skipped. '\' can be used to escape a # character.
228 '\' proceeding a line delimiter combines adjacent lines. A '\' proceeding
229 any other character is ignored and written into the output buffer
230 unmodified.</p>
231 <p>
232 </p>
233 <div class="variablelist"><table border="0">
234 <col align="left" valign="top">
235 <tbody>
236 <tr>
237 <td><p><span class="term"><em class="parameter"><code>stream</code></em> :</span></p></td>
238 <td> a stdio stream
239 </td>
240 </tr>
241 <tr>
242 <td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
243 <td> <a
244 href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
245 ><span class="type">GString</span></a> buffer into which to write the result
246 </td>
247 </tr>
248 <tr>
249 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
250 <td> 0 if the stream was already at an <code class="literal">EOF</code> character, otherwise
251               the number of lines read (this is useful for maintaining
252               a line number counter which doesn't combine lines with '\')
253 </td>
254 </tr>
255 </tbody>
256 </table></div>
257 </div>
258 <hr>
259 <div class="refsect2" lang="en">
260 <a name="pango-skip-space"></a><h3>pango_skip_space ()</h3>
261 <pre class="programlisting"><a
262 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
263 >gboolean</a>            pango_skip_space                    (const char **pos);</pre>
264 <p>
265 Skips 0 or more characters of white space.</p>
266 <p>
267 </p>
268 <div class="variablelist"><table border="0">
269 <col align="left" valign="top">
270 <tbody>
271 <tr>
272 <td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
273 <td> in/out string position
274 </td>
275 </tr>
276 <tr>
277 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
278 <td> <a
279 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
280 ><code class="literal">FALSE</code></a> if skipping the white space leaves
281 the position at a '\0' character.
282 </td>
283 </tr>
284 </tbody>
285 </table></div>
286 </div>
287 <hr>
288 <div class="refsect2" lang="en">
289 <a name="pango-scan-word"></a><h3>pango_scan_word ()</h3>
290 <pre class="programlisting"><a
291 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
292 >gboolean</a>            pango_scan_word                     (const char **pos,
293                                                          <a
294 href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
295 >GString</a> *out);</pre>
296 <p>
297 Scans a word into a <a
298 href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
299 ><span class="type">GString</span></a> buffer. A word consists
300 of [A-Za-z_] followed by zero or more [A-Za-z_0-9]
301 Leading white space is skipped.</p>
302 <p>
303 </p>
304 <div class="variablelist"><table border="0">
305 <col align="left" valign="top">
306 <tbody>
307 <tr>
308 <td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
309 <td> in/out string position
310 </td>
311 </tr>
312 <tr>
313 <td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
314 <td> a <a
315 href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
316 ><span class="type">GString</span></a> into which to write the result
317 </td>
318 </tr>
319 <tr>
320 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
321 <td> <a
322 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
323 ><code class="literal">FALSE</code></a> if a parse error occurred.
324 </td>
325 </tr>
326 </tbody>
327 </table></div>
328 </div>
329 <hr>
330 <div class="refsect2" lang="en">
331 <a name="pango-scan-string"></a><h3>pango_scan_string ()</h3>
332 <pre class="programlisting"><a
333 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
334 >gboolean</a>            pango_scan_string                   (const char **pos,
335                                                          <a
336 href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
337 >GString</a> *out);</pre>
338 <p>
339 Scans a string into a <a
340 href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
341 ><span class="type">GString</span></a> buffer. The string may either
342 be a sequence of non-white-space characters, or a quoted
343 string with '"'. Instead a quoted string, '\"' represents
344 a literal quote. Leading white space outside of quotes is skipped.</p>
345 <p>
346 </p>
347 <div class="variablelist"><table border="0">
348 <col align="left" valign="top">
349 <tbody>
350 <tr>
351 <td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
352 <td> in/out string position
353 </td>
354 </tr>
355 <tr>
356 <td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
357 <td> a <a
358 href="http://library.gnome.org/devel/glib/unstable/glib-Strings.html#GString"
359 ><span class="type">GString</span></a> into which to write the result
360 </td>
361 </tr>
362 <tr>
363 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
364 <td> <a
365 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
366 ><code class="literal">FALSE</code></a> if a parse error occurred.
367 </td>
368 </tr>
369 </tbody>
370 </table></div>
371 </div>
372 <hr>
373 <div class="refsect2" lang="en">
374 <a name="pango-scan-int"></a><h3>pango_scan_int ()</h3>
375 <pre class="programlisting"><a
376 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
377 >gboolean</a>            pango_scan_int                      (const char **pos,
378                                                          int *out);</pre>
379 <p>
380 Scans an integer.
381 Leading white space is skipped.</p>
382 <p>
383 </p>
384 <div class="variablelist"><table border="0">
385 <col align="left" valign="top">
386 <tbody>
387 <tr>
388 <td><p><span class="term"><em class="parameter"><code>pos</code></em> :</span></p></td>
389 <td> in/out string position
390 </td>
391 </tr>
392 <tr>
393 <td><p><span class="term"><em class="parameter"><code>out</code></em> :</span></p></td>
394 <td> an int into which to write the result
395 </td>
396 </tr>
397 <tr>
398 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
399 <td> <a
400 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
401 ><code class="literal">FALSE</code></a> if a parse error occurred.
402 </td>
403 </tr>
404 </tbody>
405 </table></div>
406 </div>
407 <hr>
408 <div class="refsect2" lang="en">
409 <a name="pango-config-key-get"></a><h3>pango_config_key_get ()</h3>
410 <pre class="programlisting">char *              pango_config_key_get                (const char *key);</pre>
411 <p>
412 Looks up a key in the Pango config database
413 (pseudo-win.ini style, read from $sysconfdir/pango/pangorc,
414  ~/.pangorc, and getenv (PANGO_RC_FILE).)</p>
415 <p>
416 </p>
417 <div class="variablelist"><table border="0">
418 <col align="left" valign="top">
419 <tbody>
420 <tr>
421 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
422 <td> Key to look up, in the form "SECTION/KEY".
423 </td>
424 </tr>
425 <tr>
426 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
427 <td> the value, if found, otherwise <a
428 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
429 ><code class="literal">NULL</code></a>. The value is a
430 newly-allocated string and must be freed with <a
431 href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"
432 ><code class="function">g_free()</code></a>.
433 </td>
434 </tr>
435 </tbody>
436 </table></div>
437 </div>
438 <hr>
439 <div class="refsect2" lang="en">
440 <a name="pango-lookup-aliases"></a><h3>pango_lookup_aliases ()</h3>
441 <pre class="programlisting">void                pango_lookup_aliases                (const char *fontname,
442                                                          char ***families,
443                                                          int *n_families);</pre>
444 <p>
445 Look up all user defined aliases for the alias <em class="parameter"><code>fontname</code></em>.
446 The resulting font family names will be stored in <em class="parameter"><code>families</code></em>,
447 and the number of families in <em class="parameter"><code>n_families</code></em>.</p>
448 <p>
449 </p>
450 <div class="variablelist"><table border="0">
451 <col align="left" valign="top">
452 <tbody>
453 <tr>
454 <td><p><span class="term"><em class="parameter"><code>fontname</code></em> :</span></p></td>
455 <td> an ascii string
456 </td>
457 </tr>
458 <tr>
459 <td><p><span class="term"><em class="parameter"><code>families</code></em> :</span></p></td>
460 <td> will be set to an array of font family names.
461    this array is owned by pango and should not be freed.
462 </td>
463 </tr>
464 <tr>
465 <td><p><span class="term"><em class="parameter"><code>n_families</code></em> :</span></p></td>
466 <td> will be set to the length of the <em class="parameter"><code>families</code></em> array.
467 </td>
468 </tr>
469 </tbody>
470 </table></div>
471 </div>
472 <hr>
473 <div class="refsect2" lang="en">
474 <a name="pango-parse-enum"></a><h3>pango_parse_enum ()</h3>
475 <pre class="programlisting"><a
476 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
477 >gboolean</a>            pango_parse_enum                    (<a
478 href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GType"
479 >GType</a> type,
480                                                          const char *str,
481                                                          int *value,
482                                                          <a
483 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
484 >gboolean</a> warn,
485                                                          char **possible_values);</pre>
486 <p>
487 Parses an enum type and stores the result in <em class="parameter"><code>value</code></em>.
488 </p>
489 <p>
490 If <em class="parameter"><code>str</code></em> does not match the nick name of any of the possible values for the
491 enum and is not an integer, <a
492 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
493 ><code class="literal">FALSE</code></a> is returned, a warning is issued
494 if <em class="parameter"><code>warn</code></em> is <a
495 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
496 ><code class="literal">TRUE</code></a>, and a
497 string representing the list of possible values is stored in
498 <em class="parameter"><code>possible_values</code></em>.  The list is slash-separated, eg.
499 "none/start/middle/end".  If failed and <em class="parameter"><code>possible_values</code></em> is not <a
500 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
501 ><code class="literal">NULL</code></a>,
502 returned string should be freed using <a
503 href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"
504 ><code class="function">g_free()</code></a>.</p>
505 <p>
506 </p>
507 <div class="variablelist"><table border="0">
508 <col align="left" valign="top">
509 <tbody>
510 <tr>
511 <td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
512 <td> enum type to parse, eg. <a class="link" href="pango-Layout-Objects.html#PANGO-TYPE-ELLIPSIZE-MODE--CAPS" title="PANGO_TYPE_ELLIPSIZE_MODE"><code class="literal">PANGO_TYPE_ELLIPSIZE_MODE</code></a>.
513 </td>
514 </tr>
515 <tr>
516 <td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
517 <td> string to parse.  May be <a
518 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
519 ><code class="literal">NULL</code></a>.
520 </td>
521 </tr>
522 <tr>
523 <td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
524 <td> integer to store the result in, or <a
525 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
526 ><code class="literal">NULL</code></a>.
527 </td>
528 </tr>
529 <tr>
530 <td><p><span class="term"><em class="parameter"><code>warn</code></em> :</span></p></td>
531 <td> if <a
532 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
533 ><code class="literal">TRUE</code></a>, issue a <a
534 href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-warning"
535 ><code class="function">g_warning()</code></a> on bad input.
536 </td>
537 </tr>
538 <tr>
539 <td><p><span class="term"><em class="parameter"><code>possible_values</code></em> :</span></p></td>
540 <td> place to store list of possible values on failure, or <a
541 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
542 ><code class="literal">NULL</code></a>.
543 </td>
544 </tr>
545 <tr>
546 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
547 <td> <a
548 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
549 ><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> was successfully parsed.
550
551 </td>
552 </tr>
553 </tbody>
554 </table></div>
555 <p class="since">Since 1.16</p>
556 </div>
557 <hr>
558 <div class="refsect2" lang="en">
559 <a name="pango-parse-style"></a><h3>pango_parse_style ()</h3>
560 <pre class="programlisting"><a
561 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
562 >gboolean</a>            pango_parse_style                   (const char *str,
563                                                          <a class="link" href="pango-Fonts.html#PangoStyle" title="enum PangoStyle">PangoStyle</a> *style,
564                                                          <a
565 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
566 >gboolean</a> warn);</pre>
567 <p>
568 Parses a font style. The allowed values are "normal",
569 "italic" and "oblique", case variations being
570 ignored.</p>
571 <p>
572 </p>
573 <div class="variablelist"><table border="0">
574 <col align="left" valign="top">
575 <tbody>
576 <tr>
577 <td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
578 <td> a string to parse.
579 </td>
580 </tr>
581 <tr>
582 <td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td>
583 <td> a <a class="link" href="pango-Fonts.html#PangoStyle" title="enum PangoStyle"><span class="type">PangoStyle</span></a> to store the result in.
584 </td>
585 </tr>
586 <tr>
587 <td><p><span class="term"><em class="parameter"><code>warn</code></em> :</span></p></td>
588 <td> if <a
589 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
590 ><code class="literal">TRUE</code></a>, issue a <a
591 href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-warning"
592 ><code class="function">g_warning()</code></a> on bad input.
593 </td>
594 </tr>
595 <tr>
596 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
597 <td> <a
598 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
599 ><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> was successfully parsed.
600 </td>
601 </tr>
602 </tbody>
603 </table></div>
604 </div>
605 <hr>
606 <div class="refsect2" lang="en">
607 <a name="pango-parse-variant"></a><h3>pango_parse_variant ()</h3>
608 <pre class="programlisting"><a
609 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
610 >gboolean</a>            pango_parse_variant                 (const char *str,
611                                                          <a class="link" href="pango-Fonts.html#PangoVariant" title="enum PangoVariant">PangoVariant</a> *variant,
612                                                          <a
613 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
614 >gboolean</a> warn);</pre>
615 <p>
616 Parses a font variant. The allowed values are "normal"
617 and "smallcaps" or "small_caps", case variations being
618 ignored.</p>
619 <p>
620 </p>
621 <div class="variablelist"><table border="0">
622 <col align="left" valign="top">
623 <tbody>
624 <tr>
625 <td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
626 <td> a string to parse.
627 </td>
628 </tr>
629 <tr>
630 <td><p><span class="term"><em class="parameter"><code>variant</code></em> :</span></p></td>
631 <td> a <a class="link" href="pango-Fonts.html#PangoVariant" title="enum PangoVariant"><span class="type">PangoVariant</span></a> to store the result in.
632 </td>
633 </tr>
634 <tr>
635 <td><p><span class="term"><em class="parameter"><code>warn</code></em> :</span></p></td>
636 <td> if <a
637 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
638 ><code class="literal">TRUE</code></a>, issue a <a
639 href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-warning"
640 ><code class="function">g_warning()</code></a> on bad input.
641 </td>
642 </tr>
643 <tr>
644 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
645 <td> <a
646 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
647 ><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> was successfully parsed.
648 </td>
649 </tr>
650 </tbody>
651 </table></div>
652 </div>
653 <hr>
654 <div class="refsect2" lang="en">
655 <a name="pango-parse-weight"></a><h3>pango_parse_weight ()</h3>
656 <pre class="programlisting"><a
657 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
658 >gboolean</a>            pango_parse_weight                  (const char *str,
659                                                          <a class="link" href="pango-Fonts.html#PangoWeight" title="enum PangoWeight">PangoWeight</a> *weight,
660                                                          <a
661 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
662 >gboolean</a> warn);</pre>
663 <p>
664 Parses a font weight. The allowed values are "heavy",
665 "ultrabold", "bold", "normal", "light", "ultraleight"
666 and integers. Case variations are ignored.</p>
667 <p>
668 </p>
669 <div class="variablelist"><table border="0">
670 <col align="left" valign="top">
671 <tbody>
672 <tr>
673 <td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
674 <td> a string to parse.
675 </td>
676 </tr>
677 <tr>
678 <td><p><span class="term"><em class="parameter"><code>weight</code></em> :</span></p></td>
679 <td> a <a class="link" href="pango-Fonts.html#PangoWeight" title="enum PangoWeight"><span class="type">PangoWeight</span></a> to store the result in.
680 </td>
681 </tr>
682 <tr>
683 <td><p><span class="term"><em class="parameter"><code>warn</code></em> :</span></p></td>
684 <td> if <a
685 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
686 ><code class="literal">TRUE</code></a>, issue a <a
687 href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-warning"
688 ><code class="function">g_warning()</code></a> on bad input.
689 </td>
690 </tr>
691 <tr>
692 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
693 <td> <a
694 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
695 ><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> was successfully parsed.
696 </td>
697 </tr>
698 </tbody>
699 </table></div>
700 </div>
701 <hr>
702 <div class="refsect2" lang="en">
703 <a name="pango-parse-stretch"></a><h3>pango_parse_stretch ()</h3>
704 <pre class="programlisting"><a
705 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
706 >gboolean</a>            pango_parse_stretch                 (const char *str,
707                                                          <a class="link" href="pango-Fonts.html#PangoStretch" title="enum PangoStretch">PangoStretch</a> *stretch,
708                                                          <a
709 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
710 >gboolean</a> warn);</pre>
711 <p>
712 Parses a font stretch. The allowed values are
713 "ultra_condensed", "extra_condensed", "condensed",
714 "semi_condensed", "normal", "semi_expanded", "expanded",
715 "extra_expanded" and "ultra_expanded". Case variations are
716 ignored and the '_' characters may be omitted.</p>
717 <p>
718 </p>
719 <div class="variablelist"><table border="0">
720 <col align="left" valign="top">
721 <tbody>
722 <tr>
723 <td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
724 <td> a string to parse.
725 </td>
726 </tr>
727 <tr>
728 <td><p><span class="term"><em class="parameter"><code>stretch</code></em> :</span></p></td>
729 <td> a <a class="link" href="pango-Fonts.html#PangoStretch" title="enum PangoStretch"><span class="type">PangoStretch</span></a> to store the result in.
730 </td>
731 </tr>
732 <tr>
733 <td><p><span class="term"><em class="parameter"><code>warn</code></em> :</span></p></td>
734 <td> if <a
735 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
736 ><code class="literal">TRUE</code></a>, issue a <a
737 href="http://library.gnome.org/devel/glib/unstable/glib-Message-Logging.html#g-warning"
738 ><code class="function">g_warning()</code></a> on bad input.
739 </td>
740 </tr>
741 <tr>
742 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
743 <td> <a
744 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
745 ><code class="literal">TRUE</code></a> if <em class="parameter"><code>str</code></em> was successfully parsed.
746 </td>
747 </tr>
748 </tbody>
749 </table></div>
750 </div>
751 <hr>
752 <div class="refsect2" lang="en">
753 <a name="pango-get-sysconf-subdirectory"></a><h3>pango_get_sysconf_subdirectory ()</h3>
754 <pre class="programlisting">const char *        pango_get_sysconf_subdirectory      (void);</pre>
755 <p>
756 On Unix, returns the name of the "pango" subdirectory of SYSCONFDIR
757 (which is set at compile time). On Windows, returns the etc\pango
758 subdirectory of the Pango installation directory (which is deduced
759 at run time from the DLL's location).</p>
760 <p>
761 </p>
762 <div class="variablelist"><table border="0">
763 <col align="left" valign="top">
764 <tbody><tr>
765 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
766 <td> the Pango sysconf directory. The returned string should
767 not be freed.
768 </td>
769 </tr></tbody>
770 </table></div>
771 </div>
772 <hr>
773 <div class="refsect2" lang="en">
774 <a name="pango-get-lib-subdirectory"></a><h3>pango_get_lib_subdirectory ()</h3>
775 <pre class="programlisting">const char *        pango_get_lib_subdirectory          (void);</pre>
776 <p>
777 On Unix, returns the name of the "pango" subdirectory of LIBDIR
778 (which is set at compile time). On Windows, returns the lib\pango
779 subdirectory of the Pango installation directory (which is deduced
780 at run time from the DLL's location).</p>
781 <p>
782 </p>
783 <div class="variablelist"><table border="0">
784 <col align="left" valign="top">
785 <tbody><tr>
786 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
787 <td> the Pango lib directory. The returned string should
788 not be freed.
789 </td>
790 </tr></tbody>
791 </table></div>
792 </div>
793 <hr>
794 <div class="refsect2" lang="en">
795 <a name="pango-log2vis-get-embedding-levels"></a><h3>pango_log2vis_get_embedding_levels ()</h3>
796 <pre class="programlisting"><a
797 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint8"
798 >guint8</a> *            pango_log2vis_get_embedding_levels  (const <a
799 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"
800 >gchar</a> *text,
801                                                          int length,
802                                                          <a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection">PangoDirection</a> *pbase_dir);</pre>
803 <p>
804 This will return the bidirectional embedding levels of the input paragraph
805 as defined by the Unicode Bidirectional Algorithm available at:
806 </p>
807 <p>
808   http://www.unicode.org/reports/tr9/
809 </p>
810 <p>
811 If the input base direction is a weak direction, the direction of the
812 characters in the text will determine the final resolved direction.</p>
813 <p>
814 </p>
815 <div class="variablelist"><table border="0">
816 <col align="left" valign="top">
817 <tbody>
818 <tr>
819 <td><p><span class="term"><em class="parameter"><code>text</code></em> :</span></p></td>
820 <td>      the text to itemize.
821 </td>
822 </tr>
823 <tr>
824 <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
825 <td>    the number of bytes (not characters) to process, or -1
826             if <em class="parameter"><code>text</code></em> is nul-terminated and the length should be calculated.
827 </td>
828 </tr>
829 <tr>
830 <td><p><span class="term"><em class="parameter"><code>pbase_dir</code></em> :</span></p></td>
831 <td> input base direction, and output resolved direction.
832 </td>
833 </tr>
834 <tr>
835 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
836 <td> a newly allocated array of embedding levels, one item per
837               character (not byte), that should be freed using g_free.
838
839 </td>
840 </tr>
841 </tbody>
842 </table></div>
843 <p class="since">Since 1.4</p>
844 </div>
845 <hr>
846 <div class="refsect2" lang="en">
847 <a name="pango-is-zero-width"></a><h3>pango_is_zero_width ()</h3>
848 <pre class="programlisting"><a
849 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
850 >gboolean</a>            pango_is_zero_width                 (<a
851 href="http://library.gnome.org/devel/glib/unstable/glib-Unicode-Manipulation.html#gunichar"
852 >gunichar</a> ch);</pre>
853 <p>
854 Checks <em class="parameter"><code>ch</code></em> to see if it is a character that should not be
855 normally rendered on the screen.  This includes all Unicode characters
856 with "ZERO WIDTH" in their name, as well as <em class="firstterm">bidi</em> formatting characters, and
857 a few other ones.  This is totally different from <a
858 href="http://library.gnome.org/devel/glib/unstable/glib-Unicode-Manipulation.html#g-unichar-iszerowidth"
859 ><code class="function">g_unichar_iszerowidth()</code></a>
860 and is at best misnamed.</p>
861 <p>
862 </p>
863 <div class="variablelist"><table border="0">
864 <col align="left" valign="top">
865 <tbody>
866 <tr>
867 <td><p><span class="term"><em class="parameter"><code>ch</code></em> :</span></p></td>
868 <td> a Unicode character
869 </td>
870 </tr>
871 <tr>
872 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
873 <td> <a
874 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
875 ><code class="literal">TRUE</code></a> if <em class="parameter"><code>ch</code></em> is a zero-width character, <a
876 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE--CAPS"
877 ><code class="literal">FALSE</code></a> otherwise
878
879 </td>
880 </tr>
881 </tbody>
882 </table></div>
883 <p class="since">Since 1.10</p>
884 </div>
885 <hr>
886 <div class="refsect2" lang="en">
887 <a name="pango-quantize-line-geometry"></a><h3>pango_quantize_line_geometry ()</h3>
888 <pre class="programlisting">void                pango_quantize_line_geometry        (int *thickness,
889                                                          int *position);</pre>
890 <p>
891 Quantizes the thickness and position of a line, typically an
892 underline or strikethrough, to whole device pixels, that is integer
893 multiples of <a class="link" href="pango-Glyph-Storage.html#PANGO-SCALE--CAPS" title="PANGO_SCALE"><code class="literal">PANGO_SCALE</code></a>. The purpose of this function is to avoid
894 such lines looking blurry.
895 </p>
896 <p>
897 Care is taken to make sure <em class="parameter"><code>thickness</code></em> is at least one pixel when this
898 function returns, but returned <em class="parameter"><code>position</code></em> may become zero as a result
899 of rounding.</p>
900 <p>
901 </p>
902 <div class="variablelist"><table border="0">
903 <col align="left" valign="top">
904 <tbody>
905 <tr>
906 <td><p><span class="term"><em class="parameter"><code>thickness</code></em> :</span></p></td>
907 <td> pointer to the thickness of a line, in Pango units
908 </td>
909 </tr>
910 <tr>
911 <td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td>
912 <td> corresponding position
913 </td>
914 </tr>
915 </tbody>
916 </table></div>
917 <p class="since">Since 1.12</p>
918 </div>
919 </div>
920 </div>
921 <div class="footer">
922 <hr>
923           Generated by GTK-Doc V1.11</div>
924 </body>
925 </html>