Blob Blame History Raw
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Miscellaneous Utilities: Pango Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Pango Reference Manual">
<link rel="up" href="lowlevel.html" title="Low Level Functionality">
<link rel="prev" href="pango-Modules.html" title="Modules">
<link rel="next" href="pango-Version-Checking.html" title="Version Checking">
<meta name="generator" content="GTK-Doc V1.28 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#pango-Miscellaneous-Utilities.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="lowlevel.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="pango-Modules.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="pango-Version-Checking.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="pango-Miscellaneous-Utilities"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="pango-Miscellaneous-Utilities.top_of_page"></a>Miscellaneous Utilities</span></h2>
<p>Miscellaneous Utilities — Various convenience and utility functions</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="pango-Miscellaneous-Utilities.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> **
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-split-file-list" title="pango_split_file_list ()">pango_split_file_list</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-trim-string" title="pango_trim_string ()">pango_trim_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-read-line" title="pango_read_line ()">pango_read_line</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-skip-space" title="pango_skip_space ()">pango_skip_space</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-scan-word" title="pango_scan_word ()">pango_scan_word</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-scan-string" title="pango_scan_string ()">pango_scan_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-scan-int" title="pango_scan_int ()">pango_scan_int</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-config-key-get" title="pango_config_key_get ()">pango_config_key_get</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-config-key-get-system" title="pango_config_key_get_system ()">pango_config_key_get_system</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-lookup-aliases" title="pango_lookup_aliases ()">pango_lookup_aliases</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-enum" title="pango_parse_enum ()">pango_parse_enum</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-style" title="pango_parse_style ()">pango_parse_style</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-variant" title="pango_parse_variant ()">pango_parse_variant</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-weight" title="pango_parse_weight ()">pango_parse_weight</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-parse-stretch" title="pango_parse_stretch ()">pango_parse_stretch</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-get-sysconf-subdirectory" title="pango_get_sysconf_subdirectory ()">pango_get_sysconf_subdirectory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-get-lib-subdirectory" title="pango_get_lib_subdirectory ()">pango_get_lib_subdirectory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">guint8</span> *
</td>
<td class="function_name">
<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> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-is-zero-width" title="pango_is_zero_width ()">pango_is_zero_width</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="pango-Miscellaneous-Utilities.html#pango-quantize-line-geometry" title="pango_quantize_line_geometry ()">pango_quantize_line_geometry</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="pango-Miscellaneous-Utilities.description"></a><h2>Description</h2>
<p>The functions and utilities in this section are mostly used from Pango
backends and modules, but may be useful for other purposes too.</p>
</div>
<div class="refsect1">
<a name="pango-Miscellaneous-Utilities.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="pango-split-file-list"></a><h3>pango_split_file_list ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> **
pango_split_file_list (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>);</pre>
<div class="warning"><p><code class="literal">pango_split_file_list</code> has been deprecated since version 1.38 and should not be used in newly-written code.</p></div>
<p>Splits a <code class="literal">G_SEARCHPATH_SEPARATOR</code>-separated list of files, stripping
white space and substituting ~/ with $HOME/.</p>
<div class="refsect3">
<a name="pango-split-file-list.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>a <code class="literal">G_SEARCHPATH_SEPARATOR</code> separated list of filenames</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-split-file-list.returns"></a><h4>Returns</h4>
<p>a list of
strings to be freed with <code class="function">g_strfreev()</code>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-trim-string"></a><h3>pango_trim_string ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
pango_trim_string (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>);</pre>
<div class="warning"><p><code class="literal">pango_trim_string</code> has been deprecated since version 1.38 and should not be used in newly-written code.</p></div>
<p>Trims leading and trailing whitespace from a string.</p>
<div class="refsect3">
<a name="pango-trim-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>a string</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-trim-string.returns"></a><h4>Returns</h4>
<p> A newly-allocated string that must be freed with <code class="function">g_free()</code></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-read-line"></a><h3>pango_read_line ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
pango_read_line (<em class="parameter"><code><span class="type">FILE</span> *stream</code></em>,
                 <em class="parameter"><code><span class="type">GString</span> *str</code></em>);</pre>
<div class="warning"><p><code class="literal">pango_read_line</code> has been deprecated since version 1.38 and should not be used in newly-written code.</p></div>
<p>Reads an entire line from a file into a buffer. Lines may
be delimited with '\n', '\r', '\n\r', or '\r\n'. The delimiter
is not written into the buffer. Text after a '#' character is treated as
a comment and skipped. '\' can be used to escape a # character.
'\' proceeding a line delimiter combines adjacent lines. A '\' proceeding
any other character is ignored and written into the output buffer
unmodified.</p>
<div class="refsect3">
<a name="pango-read-line.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>stream</p></td>
<td class="parameter_description"><p>a stdio stream</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p><span class="type">GString</span> buffer into which to write the result. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-read-line.returns"></a><h4>Returns</h4>
<p> 0 if the stream was already at an <code class="literal">EOF</code> character, otherwise
the number of lines read (this is useful for maintaining
a line number counter which doesn't combine lines with '\')</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-skip-space"></a><h3>pango_skip_space ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
pango_skip_space (<em class="parameter"><code>const <span class="type">char</span> **pos</code></em>);</pre>
<div class="warning"><p><code class="literal">pango_skip_space</code> has been deprecated since version 1.38 and should not be used in newly-written code.</p></div>
<p>Skips 0 or more characters of white space.</p>
<div class="refsect3">
<a name="pango-skip-space.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>pos</p></td>
<td class="parameter_description"><p>in/out string position. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-skip-space.returns"></a><h4>Returns</h4>
<p> <code class="literal">FALSE</code> if skipping the white space leaves
the position at a '\0' character.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-scan-word"></a><h3>pango_scan_word ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
pango_scan_word (<em class="parameter"><code>const <span class="type">char</span> **pos</code></em>,
                 <em class="parameter"><code><span class="type">GString</span> *out</code></em>);</pre>
<div class="warning"><p><code class="literal">pango_scan_word</code> has been deprecated since version 1.38 and should not be used in newly-written code.</p></div>
<p>Scans a word into a <span class="type">GString</span> buffer. A word consists
of [A-Za-z_] followed by zero or more [A-Za-z_0-9]
Leading white space is skipped.</p>
<div class="refsect3">
<a name="pango-scan-word.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pos</p></td>
<td class="parameter_description"><p>in/out string position. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>a <span class="type">GString</span> into which to write the result. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-scan-word.returns"></a><h4>Returns</h4>
<p> <code class="literal">FALSE</code> if a parse error occurred.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-scan-string"></a><h3>pango_scan_string ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
pango_scan_string (<em class="parameter"><code>const <span class="type">char</span> **pos</code></em>,
                   <em class="parameter"><code><span class="type">GString</span> *out</code></em>);</pre>
<div class="warning"><p><code class="literal">pango_scan_string</code> has been deprecated since version 1.38 and should not be used in newly-written code.</p></div>
<p>Scans a string into a <span class="type">GString</span> buffer. The string may either
be a sequence of non-white-space characters, or a quoted
string with '"'. Instead a quoted string, '\"' represents
a literal quote. Leading white space outside of quotes is skipped.</p>
<div class="refsect3">
<a name="pango-scan-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pos</p></td>
<td class="parameter_description"><p>in/out string position. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>a <span class="type">GString</span> into which to write the result. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-scan-string.returns"></a><h4>Returns</h4>
<p> <code class="literal">FALSE</code> if a parse error occurred.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-scan-int"></a><h3>pango_scan_int ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
pango_scan_int (<em class="parameter"><code>const <span class="type">char</span> **pos</code></em>,
                <em class="parameter"><code><span class="type">int</span> *out</code></em>);</pre>
<div class="warning"><p><code class="literal">pango_scan_int</code> has been deprecated since version 1.38 and should not be used in newly-written code.</p></div>
<p>Scans an integer.
Leading white space is skipped.</p>
<div class="refsect3">
<a name="pango-scan-int.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>pos</p></td>
<td class="parameter_description"><p>in/out string position. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>an int into which to write the result. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-scan-int.returns"></a><h4>Returns</h4>
<p> <code class="literal">FALSE</code> if a parse error occurred.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-config-key-get"></a><h3>pango_config_key_get ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
pango_config_key_get (<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre>
<div class="warning"><p><code class="literal">pango_config_key_get</code> has been deprecated since version 1.38 and should not be used in newly-written code.</p></div>
<p>Do not use.  Does not do anything.</p>
<div class="refsect3">
<a name="pango-config-key-get.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>Key to look up, in the form "SECTION/KEY".</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-config-key-get.returns"></a><h4>Returns</h4>
<p> <code class="literal">NULL</code></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-config-key-get-system"></a><h3>pango_config_key_get_system ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
pango_config_key_get_system (<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre>
<div class="warning"><p><code class="literal">pango_config_key_get_system</code> has been deprecated since version 1.38 and should not be used in newly-written code.</p></div>
<p>Do not use.  Does not do anything.</p>
<div class="refsect3">
<a name="pango-config-key-get-system.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>Key to look up, in the form "SECTION/KEY".</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-config-key-get-system.returns"></a><h4>Returns</h4>
<p> <code class="literal">NULL</code></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-lookup-aliases"></a><h3>pango_lookup_aliases ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
pango_lookup_aliases (<em class="parameter"><code>const <span class="type">char</span> *fontname</code></em>,
                      <em class="parameter"><code><span class="type">char</span> ***families</code></em>,
                      <em class="parameter"><code><span class="type">int</span> *n_families</code></em>);</pre>
<div class="warning">
<p><code class="literal">pango_lookup_aliases</code> has been deprecated since version 1.32 and should not be used in newly-written code.</p>
<p>This function is not thread-safe.</p>
</div>
<p>Look up all user defined aliases for the alias <em class="parameter"><code>fontname</code></em>
.
The resulting font family names will be stored in <em class="parameter"><code>families</code></em>
,
and the number of families in <em class="parameter"><code>n_families</code></em>
.</p>
<div class="refsect3">
<a name="pango-lookup-aliases.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>fontname</p></td>
<td class="parameter_description"><p>an ascii string</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>families</p></td>
<td class="parameter_description"><p>will be set to an array of font family names.
this array is owned by pango and should not be freed. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_families]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>n_families</p></td>
<td class="parameter_description"><p>will be set to the length of the <em class="parameter"><code>families</code></em>
array. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-parse-enum"></a><h3>pango_parse_enum ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
pango_parse_enum (<em class="parameter"><code><span class="type">GType</span> type</code></em>,
                  <em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
                  <em class="parameter"><code><span class="type">int</span> *value</code></em>,
                  <em class="parameter"><code><span class="type">gboolean</span> warn</code></em>,
                  <em class="parameter"><code><span class="type">char</span> **possible_values</code></em>);</pre>
<div class="warning"><p><code class="literal">pango_parse_enum</code> has been deprecated since version 1.38 and should not be used in newly-written code.</p></div>
<p>Parses an enum type and stores the result in <em class="parameter"><code>value</code></em>
.</p>
<p>If <em class="parameter"><code>str</code></em>
 does not match the nick name of any of the possible values for the
enum and is not an integer, <code class="literal">FALSE</code> is returned, a warning is issued
if <em class="parameter"><code>warn</code></em>
 is <code class="literal">TRUE</code>, and a
string representing the list of possible values is stored in
<em class="parameter"><code>possible_values</code></em>
.  The list is slash-separated, eg.
"none/start/middle/end".  If failed and <em class="parameter"><code>possible_values</code></em>
 is not <code class="literal">NULL</code>,
returned string should be freed using <code class="function">g_free()</code>.</p>
<div class="refsect3">
<a name="pango-parse-enum.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>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>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>string to parse.  May be <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>integer to store the result in, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>warn</p></td>
<td class="parameter_description"><p>if <code class="literal">TRUE</code>, issue a <code class="function">g_warning()</code> on bad input.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>possible_values</p></td>
<td class="parameter_description"><p>place to store list of possible values on failure, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-parse-enum.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>str</code></em>
was successfully parsed.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-16.html#api-index-1.16">1.16</a></p>
</div>
<hr>
<div class="refsect2">
<a name="pango-parse-style"></a><h3>pango_parse_style ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
pango_parse_style (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
                   <em class="parameter"><code><a class="link" href="pango-Fonts.html#PangoStyle" title="enum PangoStyle"><span class="type">PangoStyle</span></a> *style</code></em>,
                   <em class="parameter"><code><span class="type">gboolean</span> warn</code></em>);</pre>
<p>Parses a font style. The allowed values are "normal",
"italic" and "oblique", case variations being
ignored.</p>
<div class="refsect3">
<a name="pango-parse-style.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>a string to parse.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>style</p></td>
<td class="parameter_description"><p>a <a class="link" href="pango-Fonts.html#PangoStyle" title="enum PangoStyle"><span class="type">PangoStyle</span></a> to store the result
in. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>warn</p></td>
<td class="parameter_description"><p>if <code class="literal">TRUE</code>, issue a <code class="function">g_warning()</code> on bad input.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-parse-style.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>str</code></em>
was successfully parsed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-parse-variant"></a><h3>pango_parse_variant ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
pango_parse_variant (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
                     <em class="parameter"><code><a class="link" href="pango-Fonts.html#PangoVariant" title="enum PangoVariant"><span class="type">PangoVariant</span></a> *variant</code></em>,
                     <em class="parameter"><code><span class="type">gboolean</span> warn</code></em>);</pre>
<p>Parses a font variant. The allowed values are "normal"
and "smallcaps" or "small_caps", case variations being
ignored.</p>
<div class="refsect3">
<a name="pango-parse-variant.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>a string to parse.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>variant</p></td>
<td class="parameter_description"><p>a <a class="link" href="pango-Fonts.html#PangoVariant" title="enum PangoVariant"><span class="type">PangoVariant</span></a> to store the
result in. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>warn</p></td>
<td class="parameter_description"><p>if <code class="literal">TRUE</code>, issue a <code class="function">g_warning()</code> on bad input.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-parse-variant.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>str</code></em>
was successfully parsed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-parse-weight"></a><h3>pango_parse_weight ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
pango_parse_weight (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
                    <em class="parameter"><code><a class="link" href="pango-Fonts.html#PangoWeight" title="enum PangoWeight"><span class="type">PangoWeight</span></a> *weight</code></em>,
                    <em class="parameter"><code><span class="type">gboolean</span> warn</code></em>);</pre>
<p>Parses a font weight. The allowed values are "heavy",
"ultrabold", "bold", "normal", "light", "ultraleight"
and integers. Case variations are ignored.</p>
<div class="refsect3">
<a name="pango-parse-weight.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>a string to parse.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>weight</p></td>
<td class="parameter_description"><p>a <a class="link" href="pango-Fonts.html#PangoWeight" title="enum PangoWeight"><span class="type">PangoWeight</span></a> to store the result
in. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>warn</p></td>
<td class="parameter_description"><p>if <code class="literal">TRUE</code>, issue a <code class="function">g_warning()</code> on bad input.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-parse-weight.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>str</code></em>
was successfully parsed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-parse-stretch"></a><h3>pango_parse_stretch ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
pango_parse_stretch (<em class="parameter"><code>const <span class="type">char</span> *str</code></em>,
                     <em class="parameter"><code><a class="link" href="pango-Fonts.html#PangoStretch" title="enum PangoStretch"><span class="type">PangoStretch</span></a> *stretch</code></em>,
                     <em class="parameter"><code><span class="type">gboolean</span> warn</code></em>);</pre>
<p>Parses a font stretch. The allowed values are
"ultra_condensed", "extra_condensed", "condensed",
"semi_condensed", "normal", "semi_expanded", "expanded",
"extra_expanded" and "ultra_expanded". Case variations are
ignored and the '_' characters may be omitted.</p>
<div class="refsect3">
<a name="pango-parse-stretch.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>a string to parse.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>stretch</p></td>
<td class="parameter_description"><p>a <a class="link" href="pango-Fonts.html#PangoStretch" title="enum PangoStretch"><span class="type">PangoStretch</span></a> to store the
result in. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>warn</p></td>
<td class="parameter_description"><p>if <code class="literal">TRUE</code>, issue a <code class="function">g_warning()</code> on bad input.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-parse-stretch.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>str</code></em>
was successfully parsed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-get-sysconf-subdirectory"></a><h3>pango_get_sysconf_subdirectory ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
pango_get_sysconf_subdirectory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning"><p><code class="literal">pango_get_sysconf_subdirectory</code> has been deprecated since version 1.38 and should not be used in newly-written code.</p></div>
<p>Returns the name of the "pango" subdirectory of SYSCONFDIR
(which is set at compile time).</p>
<div class="refsect3">
<a name="pango-get-sysconf-subdirectory.returns"></a><h4>Returns</h4>
<p> the Pango sysconf directory. The returned string should
not be freed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-get-lib-subdirectory"></a><h3>pango_get_lib_subdirectory ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
pango_get_lib_subdirectory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning"><p><code class="literal">pango_get_lib_subdirectory</code> has been deprecated since version 1.38 and should not be used in newly-written code.</p></div>
<p>Returns the name of the "pango" subdirectory of LIBDIR
(which is set at compile time).</p>
<div class="refsect3">
<a name="pango-get-lib-subdirectory.returns"></a><h4>Returns</h4>
<p> the Pango lib directory. The returned string should
not be freed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="pango-log2vis-get-embedding-levels"></a><h3>pango_log2vis_get_embedding_levels ()</h3>
<pre class="programlisting"><span class="returnvalue">guint8</span> *
pango_log2vis_get_embedding_levels (<em class="parameter"><code>const <span class="type">gchar</span> *text</code></em>,
                                    <em class="parameter"><code><span class="type">int</span> length</code></em>,
                                    <em class="parameter"><code><a class="link" href="pango-Bidirectional-Text.html#PangoDirection" title="enum PangoDirection"><span class="type">PangoDirection</span></a> *pbase_dir</code></em>);</pre>
<p>This will return the bidirectional embedding levels of the input paragraph
as defined by the Unicode Bidirectional Algorithm available at:</p>
<p>  http://www.unicode.org/reports/tr9/</p>
<p>If the input base direction is a weak direction, the direction of the
characters in the text will determine the final resolved direction.</p>
<div class="refsect3">
<a name="pango-log2vis-get-embedding-levels.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>text</p></td>
<td class="parameter_description"><p>the text to itemize.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the number of bytes (not characters) to process, or -1
if <em class="parameter"><code>text</code></em>
is nul-terminated and the length should be calculated.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>pbase_dir</p></td>
<td class="parameter_description"><p>input base direction, and output resolved direction.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-log2vis-get-embedding-levels.returns"></a><h4>Returns</h4>
<p> a newly allocated array of embedding levels, one item per
character (not byte), that should be freed using g_free.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-4.html#api-index-1.4">1.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="pango-is-zero-width"></a><h3>pango_is_zero_width ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
pango_is_zero_width (<em class="parameter"><code><span class="type">gunichar</span> ch</code></em>);</pre>
<p>Checks <em class="parameter"><code>ch</code></em>
 to see if it is a character that should not be
normally rendered on the screen.  This includes all Unicode characters
with "ZERO WIDTH" in their name, as well as <em class="firstterm">bidi</em> formatting characters, and
a few other ones.  This is totally different from <code class="function">g_unichar_iszerowidth()</code>
and is at best misnamed.</p>
<div class="refsect3">
<a name="pango-is-zero-width.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>ch</p></td>
<td class="parameter_description"><p>a Unicode character</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="pango-is-zero-width.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>ch</code></em>
is a zero-width character, <code class="literal">FALSE</code> otherwise</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-10.html#api-index-1.10">1.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="pango-quantize-line-geometry"></a><h3>pango_quantize_line_geometry ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
pango_quantize_line_geometry (<em class="parameter"><code><span class="type">int</span> *thickness</code></em>,
                              <em class="parameter"><code><span class="type">int</span> *position</code></em>);</pre>
<p>Quantizes the thickness and position of a line, typically an
underline or strikethrough, to whole device pixels, that is integer
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
such lines looking blurry.</p>
<p>Care is taken to make sure <em class="parameter"><code>thickness</code></em>
 is at least one pixel when this
function returns, but returned <em class="parameter"><code>position</code></em>
 may become zero as a result
of rounding.</p>
<div class="refsect3">
<a name="pango-quantize-line-geometry.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>thickness</p></td>
<td class="parameter_description"><p>pointer to the thickness of a line, in Pango units. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>position</p></td>
<td class="parameter_description"><p>corresponding position. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for input and for returning results. Default is transfer full."><span class="acronym">inout</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-1-12.html#api-index-1.12">1.12</a></p>
</div>
</div>
<div class="refsect1">
<a name="pango-Miscellaneous-Utilities.other_details"></a><h2>Types and Values</h2>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.28</div>
</body>
</html>