|
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17 System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64 User : nobody ( 99) PHP Version : 5.2.17 Disable Function : NONE Directory : /usr/share/gtk-doc/html/pango/ |
Upload File : |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>Rendering</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
<link rel="start" href="index.html" title="Pango Reference Manual">
<link rel="up" href="pango.html" title="Basic Pango Interfaces">
<link rel="prev" href="pango.html" title="Basic Pango Interfaces">
<link rel="next" href="pango-Glyph-Storage.html" title="Glyph Storage">
<meta name="generator" content="GTK-Doc V1.6 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="pango.html" title="Basic Pango Interfaces">
<link rel="chapter" href="rendering.html" title="Rendering with Pango">
<link rel="chapter" href="lowlevel.html" title="Low Level Functionality">
<link rel="chapter" href="tools.html" title="Pango Tools">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 1.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 1.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 1.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 1.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 1.10">
<link rel="index" href="ix08.html" title="Index of new symbols in 1.12">
<link rel="index" href="ix09.html" title="Index of new symbols in 1.14">
</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.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="pango-Glyph-Storage.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts"><nobr><a href="#top_of_page" class="shortcut">Top</a>
 | 
<a href="#desc" class="shortcut">Description</a>
 | 
<a href="#object_hierarchy" class="shortcut">Object Hierarchy</a></nobr></td></tr>
</table>
<div class="refentry" lang="en">
<a name="pango-Text-Processing"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="top_of_page"></a>Rendering</span></h2>
<p>Rendering — Functions to run the rendering pipeline</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="synopsis"></a><h2>Synopsis</h2>
<a name="PangoContext"></a><pre class="synopsis">
<a href="pango-Text-Processing.html#PangoContext-struct">PangoContext</a>;
<a href="pango-Text-Processing.html#PangoItem">PangoItem</a>;
<a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a>;
enum <a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a>;
#define <a href="pango-Text-Processing.html#PANGO-TYPE-DIRECTION:CAPS">PANGO_TYPE_DIRECTION</a>
<a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>* <a href="pango-Text-Processing.html#pango-itemize">pango_itemize</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
const char *text,
int start_index,
int length,
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *attrs,
<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *cached_iter);
<a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>* <a href="pango-Text-Processing.html#pango-itemize-with-base-dir">pango_itemize_with_base_dir</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
<a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> base_dir,
const char *text,
int start_index,
int length,
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *attrs,
<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *cached_iter);
void <a href="pango-Text-Processing.html#pango-item-free">pango_item_free</a> (<a href="pango-Text-Processing.html#PangoItem">PangoItem</a> *item);
<a href="pango-Text-Processing.html#PangoItem">PangoItem</a>* <a href="pango-Text-Processing.html#pango-item-copy">pango_item_copy</a> (<a href="pango-Text-Processing.html#PangoItem">PangoItem</a> *item);
<a href="pango-Text-Processing.html#PangoItem">PangoItem</a>* <a href="pango-Text-Processing.html#pango-item-new">pango_item_new</a> (void);
<a href="pango-Text-Processing.html#PangoItem">PangoItem</a>* <a href="pango-Text-Processing.html#pango-item-split">pango_item_split</a> (<a href="pango-Text-Processing.html#PangoItem">PangoItem</a> *orig,
int split_index,
int split_offset);
<a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>* <a href="pango-Text-Processing.html#pango-reorder-items">pango_reorder_items</a> (<a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a> *logical_items);
<a href="pango-Text-Processing.html#PangoContext">PangoContext</a>* <a href="pango-Text-Processing.html#pango-context-new">pango_context_new</a> (void);
void <a href="pango-Text-Processing.html#pango-context-set-font-map">pango_context_set_font_map</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
<a href="pango-Fonts.html#PangoFontMap">PangoFontMap</a> *font_map);
<a href="pango-Fonts.html#PangoFontMap">PangoFontMap</a>* <a href="pango-Text-Processing.html#pango-context-get-font-map">pango_context_get_font_map</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);
<a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a>* <a href="pango-Text-Processing.html#pango-context-get-font-description">pango_context_get_font_description</a>
(<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);
void <a href="pango-Text-Processing.html#pango-context-set-font-description">pango_context_set_font_description</a>
(<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc);
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a>* <a href="pango-Text-Processing.html#pango-context-get-language">pango_context_get_language</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);
void <a href="pango-Text-Processing.html#pango-context-set-language">pango_context_set_language</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);
<a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> <a href="pango-Text-Processing.html#pango-context-get-base-dir">pango_context_get_base_dir</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);
void <a href="pango-Text-Processing.html#pango-context-set-base-dir">pango_context_set_base_dir</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
<a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> direction);
const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a>* <a href="pango-Text-Processing.html#pango-context-get-matrix">pango_context_get_matrix</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);
void <a href="pango-Text-Processing.html#pango-context-set-matrix">pango_context_set_matrix</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix);
<a href="pango-Fonts.html#PangoFont">PangoFont</a>* <a href="pango-Text-Processing.html#pango-context-load-font">pango_context_load_font</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc);
<a href="pango-Fonts.html#PangoFontset">PangoFontset</a>* <a href="pango-Text-Processing.html#pango-context-load-fontset">pango_context_load_fontset</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc,
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);
<a href="pango-Fonts.html#PangoFontMetrics">PangoFontMetrics</a>* <a href="pango-Text-Processing.html#pango-context-get-metrics">pango_context_get_metrics</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc,
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);
void <a href="pango-Text-Processing.html#pango-context-list-families">pango_context_list_families</a> (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
<a href="pango-Fonts.html#PangoFontFamily">PangoFontFamily</a> ***families,
int *n_families);
<a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> <a href="pango-Text-Processing.html#pango-get-mirror-char">pango_get_mirror_char</a> (<a
href="../glib/glib-Unicode-Manipulation.html#gunichar"
>gunichar</a> ch,
<a
href="../glib/glib-Unicode-Manipulation.html#gunichar"
>gunichar</a> *mirrored_ch);
<a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> <a href="pango-Text-Processing.html#pango-unichar-direction">pango_unichar_direction</a> (<a
href="../glib/glib-Unicode-Manipulation.html#gunichar"
>gunichar</a> ch);
<a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> <a href="pango-Text-Processing.html#pango-find-base-dir">pango_find_base_dir</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length);
void <a href="pango-Text-Processing.html#pango-break">pango_break</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
int length,
<a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> *analysis,
<a href="pango-Text-Processing.html#PangoLogAttr">PangoLogAttr</a> *attrs,
int attrs_len);
void <a href="pango-Text-Processing.html#pango-get-log-attrs">pango_get_log_attrs</a> (const char *text,
int length,
int level,
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language,
<a href="pango-Text-Processing.html#PangoLogAttr">PangoLogAttr</a> *log_attrs,
int attrs_len);
void <a href="pango-Text-Processing.html#pango-find-paragraph-boundary">pango_find_paragraph_boundary</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *paragraph_delimiter_index,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *next_paragraph_start);
void <a href="pango-Text-Processing.html#pango-default-break">pango_default_break</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
int length,
<a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> *analysis,
<a href="pango-Text-Processing.html#PangoLogAttr">PangoLogAttr</a> *attrs,
int attrs_len);
<a href="pango-Text-Processing.html#PangoLogAttr">PangoLogAttr</a>;
void <a href="pango-Text-Processing.html#pango-shape">pango_shape</a> (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length,
const <a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> *analysis,
<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *glyphs);
</pre>
</div>
<div class="refsect1" lang="en">
<a name="object_hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
>GObject</a>
+----PangoContext
</pre>
</div>
<div class="refsect1" lang="en">
<a name="desc"></a><h2>Description</h2>
<p>
The Pango rendering pipeline takes a string of
Unicode characters and converts it into glyphs.
The functions described in this section accomplish
various steps of this process.
</p>
</div>
<div class="refsect1" lang="en">
<a name="details"></a><h2>Details</h2>
<div class="refsect2" lang="en">
<a name="id2738012"></a><h3>
<a name="PangoContext-struct"></a>PangoContext</h3>
<a class="indexterm" name="id2738024"></a><pre class="programlisting">typedef struct _PangoContext PangoContext;</pre>
<p>
The <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> structure stores global information
used to control the itemization process.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2738050"></a><h3>
<a name="PangoItem"></a>PangoItem</h3>
<a class="indexterm" name="id2738062"></a><pre class="programlisting">typedef struct {
gint offset;
gint length;
gint num_chars;
PangoAnalysis analysis;
} PangoItem;
</pre>
<p>
The <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> structure stores information about
a segment of text. It contains the following fields:
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <em class="structfield"><code>offset</code></em>;</span></td>
<td>the offset of the segment from the beginning of the
string in bytes.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <em class="structfield"><code>length</code></em>;</span></td>
<td>the length of the segment in bytes.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> <em class="structfield"><code>num_chars</code></em>;</span></td>
<td>the length of the segment in characters.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> <em class="structfield"><code>analysis</code></em>;</span></td>
<td>the properties of the segment.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2738178"></a><h3>
<a name="PangoAnalysis"></a>PangoAnalysis</h3>
<a class="indexterm" name="id2738190"></a><pre class="programlisting">typedef struct {
PangoEngineShape *shape_engine;
PangoEngineLang *lang_engine;
PangoFont *font;
guint8 level;
PangoLanguage *language;
GSList *extra_attrs;
} PangoAnalysis;
</pre>
<p>
The <a href="pango-Text-Processing.html#PangoAnalysis"><span class="type">PangoAnalysis</span></a> structure stores information about
the properties of a segment of text. It has the following
fields:
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a href="PangoEngineShape.html" title="PangoEngineShape">PangoEngineShape</a> *<em class="structfield"><code>shape_engine</code></em>;</span></td>
<td>the engine for doing rendering-system-dependent processing.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="PangoEngineLang.html" title="PangoEngineLang">PangoEngineLang</a> *<em class="structfield"><code>lang_engine</code></em>;</span></td>
<td>the engine for doing rendering-system-independent processing.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="pango-Fonts.html#PangoFont">PangoFont</a> *<em class="structfield"><code>font</code></em>;</span></td>
<td>the font for this segment.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint8"
>guint8</a> <em class="structfield"><code>level</code></em>;</span></td>
<td>the bidrectional level for this segment.
</td>
</tr>
<tr>
<td>
<span class="term"><a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *<em class="structfield"><code>language</code></em>;</span></td>
<td>the detected language for this segment.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Singly-Linked-Lists.html#GSList"
>GSList</a> *<em class="structfield"><code>extra_attrs</code></em>;</span></td>
<td>extra attributes for this segment.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2738352"></a><h3>
<a name="PangoDirection"></a>enum PangoDirection</h3>
<a class="indexterm" name="id2738364"></a><pre class="programlisting">typedef enum {
PANGO_DIRECTION_LTR,
PANGO_DIRECTION_RTL,
PANGO_DIRECTION_TTB_LTR,
PANGO_DIRECTION_TTB_RTL,
PANGO_DIRECTION_WEAK_LTR,
PANGO_DIRECTION_WEAK_RTL,
PANGO_DIRECTION_NEUTRAL
} PangoDirection;
</pre>
<p>
The <a href="pango-Text-Processing.html#PangoDirection"><span class="type">PangoDirection</span></a> type represents a direction in the
Unicode bidirectional algorithm; not every value in this
enumeration makes sense for every usage of <a href="pango-Text-Processing.html#PangoDirection"><span class="type">PangoDirection</span></a>;
for example, the return value of <a href="pango-Text-Processing.html#pango-unichar-direction"><code class="function">pango_unichar_direction()</code></a>
and <a href="pango-Text-Processing.html#pango-find-base-dir"><code class="function">pango_find_base_dir()</code></a> cannot be <a href="pango-Text-Processing.html#PANGO-DIRECTION-WEAK-LTR:CAPS"><code class="literal">PANGO_DIRECTION_WEAK_LTR</code></a>
or <a href="pango-Text-Processing.html#PANGO-DIRECTION-WEAK-RTL:CAPS"><code class="literal">PANGO_DIRECTION_WEAK_RTL</code></a>, since every character is either
neutral or has a strong direction; on the other hand
<a href="pango-Text-Processing.html#PANGO-DIRECTION-NEUTRAL:CAPS"><code class="literal">PANGO_DIRECTION_NEUTRAL</code></a> doesn't make sense to pass
to <a href="pango-Text-Processing.html#pango-itemize-with-base-dir"><code class="function">pango_itemize_with_base_dir()</code></a>.
</p>
<p>
The <a href="pango-Text-Processing.html#PANGO-DIRECTION-TTB-LTR:CAPS"><code class="literal">PANGO_DIRECTION_TTB_LTR</code></a>, <a href="pango-Text-Processing.html#PANGO-DIRECTION-TTB-RTL:CAPS"><code class="literal">PANGO_DIRECTION_TTB_RTL</code></a>
values come from an earlier interpretation of this
enumeration as the writing direction of a block of
text and are no longer used; See the Text module of the
CSS3 spec for how vertical text is planned to be handled
in a future version of Pango. The explanation of why
<a href="pango-Text-Processing.html#PANGO-DIRECTION-TTB-LTR:CAPS"><code class="literal">PANGO_DIRECTION_TTB_LTR</code></a> is treated as <a href="pango-Text-Processing.html#PANGO-DIRECTION-RTL:CAPS"><code class="literal">PANGO_DIRECTION_RTL</code></a>
can be found there as well.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a name="PANGO-DIRECTION-LTR:CAPS"></a><code class="literal">PANGO_DIRECTION_LTR</code></span></td>
<td> A strong left-to-right direction
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-DIRECTION-RTL:CAPS"></a><code class="literal">PANGO_DIRECTION_RTL</code></span></td>
<td> A strong right-to-left direction
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-DIRECTION-TTB-LTR:CAPS"></a><code class="literal">PANGO_DIRECTION_TTB_LTR</code></span></td>
<td> Deprecated value; treated the
same as <a href="pango-Text-Processing.html#PANGO-DIRECTION-RTL:CAPS"><code class="literal">PANGO_DIRECTION_RTL</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-DIRECTION-TTB-RTL:CAPS"></a><code class="literal">PANGO_DIRECTION_TTB_RTL</code></span></td>
<td> Deprecated value; treated the
same as <a href="pango-Text-Processing.html#PANGO-DIRECTION-LTR:CAPS"><code class="literal">PANGO_DIRECTION_LTR</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-DIRECTION-WEAK-LTR:CAPS"></a><code class="literal">PANGO_DIRECTION_WEAK_LTR</code></span></td>
<td> A weak left-to-right direction
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-DIRECTION-WEAK-RTL:CAPS"></a><code class="literal">PANGO_DIRECTION_WEAK_RTL</code></span></td>
<td> A weak right-to-left direction
</td>
</tr>
<tr>
<td>
<span class="term"><a name="PANGO-DIRECTION-NEUTRAL:CAPS"></a><code class="literal">PANGO_DIRECTION_NEUTRAL</code></span></td>
<td> No direction specified
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2738716"></a><h3>
<a name="PANGO-TYPE-DIRECTION:CAPS"></a>PANGO_TYPE_DIRECTION</h3>
<a class="indexterm" name="id2738729"></a><pre class="programlisting">#define PANGO_TYPE_DIRECTION (pango_direction_get_type())
</pre>
<p>
The <a
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
><span class="type">GObject</span></a> type for <a href="pango-Text-Processing.html#PangoDirection"><span class="type">PangoDirection</span></a>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2738761"></a><h3>
<a name="pango-itemize"></a>pango_itemize ()</h3>
<a class="indexterm" name="id2738774"></a><pre class="programlisting"><a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>* pango_itemize (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
const char *text,
int start_index,
int length,
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *attrs,
<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *cached_iter);</pre>
<p>
Breaks a piece of text into segments with consistent
directional level and shaping engine. Each byte of <em class="parameter"><code>text</code></em> will
be contained in exactly one of the items in the returned list;
the generated list of items will be in logical order (the start
offsets of the items are ascending).
</p>
<p>
<em class="parameter"><code>cached_iter</code></em> should be an iterator over <em class="parameter"><code>attrs</code></em> currently positioned at a
range before or containing <em class="parameter"><code>start_index</code></em>; <em class="parameter"><code>cached_iter</code></em> will be advanced to
the range covering the position just after <em class="parameter"><code>start_index</code></em> + <em class="parameter"><code>length</code></em>.
(i.e. if itemizing in a loop, just keep passing in the same <em class="parameter"><code>cached_iter</code></em>).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a structure holding information that affects
the itemization process.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to itemize.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>start_index</code></em> :</span></td>
<td> first byte in <em class="parameter"><code>text</code></em> to process
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> the number of bytes (not characters) to process
after <em class="parameter"><code>start_index</code></em>.
This must be >= 0.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attrs</code></em> :</span></td>
<td> the set of attributes that apply to <em class="parameter"><code>text</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>cached_iter</code></em> :</span></td>
<td> Cached attribute iterator, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a GList of PangoItem structures.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2739032"></a><h3>
<a name="pango-itemize-with-base-dir"></a>pango_itemize_with_base_dir ()</h3>
<a class="indexterm" name="id2739048"></a><pre class="programlisting"><a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>* pango_itemize_with_base_dir (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
<a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> base_dir,
const char *text,
int start_index,
int length,
<a href="pango-Text-Attributes.html#PangoAttrList">PangoAttrList</a> *attrs,
<a href="pango-Text-Attributes.html#PangoAttrIterator">PangoAttrIterator</a> *cached_iter);</pre>
<p>
Like <a href="pango-Text-Processing.html#pango-itemize"><code class="function">pango_itemize()</code></a>, but the base direction to use when
computing bidirectional levels (see <a href="pango-Text-Processing.html#pango-context-set-base-dir"><code class="function">pango_context_set_base_dir()</code></a>),
is specified explicitely rather than gotten from the <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a structure holding information that affects
the itemization process.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>base_dir</code></em> :</span></td>
<td> base direction to use for bidirectional processing
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to itemize.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>start_index</code></em> :</span></td>
<td> first byte in <em class="parameter"><code>text</code></em> to process
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> the number of bytes (not characters) to process
after <em class="parameter"><code>start_index</code></em>.
This must be >= 0.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attrs</code></em> :</span></td>
<td> the set of attributes that apply to <em class="parameter"><code>text</code></em>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>cached_iter</code></em> :</span></td>
<td> Cached attribute iterator, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a GList of PangoItem structures.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2739307"></a><h3>
<a name="pango-item-free"></a>pango_item_free ()</h3>
<a class="indexterm" name="id2739319"></a><pre class="programlisting">void pango_item_free (<a href="pango-Text-Processing.html#PangoItem">PangoItem</a> *item);</pre>
<p>
Free a <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> and all associated memory.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><em class="parameter"><code>item</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2739384"></a><h3>
<a name="pango-item-copy"></a>pango_item_copy ()</h3>
<a class="indexterm" name="id2739397"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoItem">PangoItem</a>* pango_item_copy (<a href="pango-Text-Processing.html#PangoItem">PangoItem</a> *item);</pre>
<p>
Copy an existing <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> structure.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>item</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a>, which should
be freed with <a href="pango-Text-Processing.html#pango-item-free"><code class="function">pango_item_free()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2739492"></a><h3>
<a name="pango-item-new"></a>pango_item_new ()</h3>
<a class="indexterm" name="id2739504"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoItem">PangoItem</a>* pango_item_new (void);</pre>
<p>
Creates a new <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> structure initialized to default values.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a>, which should
be freed with <a href="pango-Text-Processing.html#pango-item-free"><code class="function">pango_item_free()</code></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2739571"></a><h3>
<a name="pango-item-split"></a>pango_item_split ()</h3>
<a class="indexterm" name="id2739584"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoItem">PangoItem</a>* pango_item_split (<a href="pango-Text-Processing.html#PangoItem">PangoItem</a> *orig,
int split_index,
int split_offset);</pre>
<p>
Modifies <em class="parameter"><code>orig</code></em> to cover only the text after <em class="parameter"><code>split_index</code></em>, and
returns a new item that covers the text before <em class="parameter"><code>split_index</code></em> that
used to be in <em class="parameter"><code>orig</code></em>. You can think of <em class="parameter"><code>split_index</code></em> as the length of
the returned item. <em class="parameter"><code>split_index</code></em> may not be 0, and it may not be
greater than or equal to the length of <em class="parameter"><code>orig</code></em> (that is, there must
be at least one byte assigned to each item, you can't create a
zero-length item). <em class="parameter"><code>split_offset</code></em> is the length of the first item in
chars, and must be provided because the text used to generate the
item isn't available, so <a href="pango-Text-Processing.html#pango-item-split"><code class="function">pango_item_split()</code></a> can't count the char
length of the split items itself.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>orig</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>split_index</code></em> :</span></td>
<td> byte index of position to split item, relative to the start of the item
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>split_offset</code></em> :</span></td>
<td> number of chars between start of <em class="parameter"><code>orig</code></em> and <em class="parameter"><code>split_index</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> new item representing text before <em class="parameter"><code>split_index</code></em>, which
should be freed with <a href="pango-Text-Processing.html#pango-item-free"><code class="function">pango_item_free()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2739790"></a><h3>
<a name="pango-reorder-items"></a>pango_reorder_items ()</h3>
<a class="indexterm" name="id2739803"></a><pre class="programlisting"><a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a>* pango_reorder_items (<a
href="../glib/glib-Doubly-Linked-Lists.html#GList"
>GList</a> *logical_items);</pre>
<p>
From a list of items in logical order and the associated
directional levels, produce a list in visual order.
The original list is unmodified.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>logical_items</code></em> :</span></td>
<td> a GList of <a href="pango-Text-Processing.html#PangoItem"><span class="type">PangoItem</span></a> in logical order.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>a GList of PangoItem structures in visual order.
(Please mail otaylor<em class="parameter"><code>redhat.com</code></em> if you use this function.
It is not a particularly convenient interface, and the code
is duplicated elsewhere in Pango for that reason.)
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2739883"></a><h3>
<a name="pango-context-new"></a>pango_context_new ()</h3>
<a class="indexterm" name="id2739896"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoContext">PangoContext</a>* pango_context_new (void);</pre>
<p>
Creates a new <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> initialized to default value.
</p>
<p>
This function is only useful when implementing a new backend
for Pango, something applications won't do. You should use
the context creation function for the backend you are using,
for example, <a href="pango-Xft-Fonts-and-Rendering.html#pango-xft-get-context"><code class="function">pango_xft_get_context()</code></a>, <a href="pango-Win32-Fonts-and-Rendering.html#pango-win32-get-context"><code class="function">pango_win32_get_context()</code></a>
or, <a href="pango-FreeType-Fonts-and-Rendering.html#pango-ft2-font-map-create-context"><code class="function">pango_ft2_font_map_create_context()</code></a>.
</p>
<p>
If you are using Pango as part of a higher-level system,
that system may have it's own ways of create a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>.
For instance, the GTK+ toolkit has, among others,
<code class="function">gdk_pango_context_get_for_screen()</code>, and
<code class="function">gtk_widget_get_pango_context()</code>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the newly allocated <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>, which should
be freed with <a
href="../gobject/gobject-The-Base-Object-Type.html#g-object-unref"
><code class="function">g_object_unref()</code></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2740046"></a><h3>
<a name="pango-context-set-font-map"></a>pango_context_set_font_map ()</h3>
<a class="indexterm" name="id2740060"></a><pre class="programlisting">void pango_context_set_font_map (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
<a href="pango-Fonts.html#PangoFontMap">PangoFontMap</a> *font_map);</pre>
<p>
Sets the font map to be searched when fonts are looked-up in this context.
This is only for internal use by Pango backends, a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> obtained
via one of the recommended methods should already have a suitable font map.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>font_map</code></em> :</span></td>
<td> the <a href="pango-Fonts.html#PangoFontMap"><span class="type">PangoFontMap</span></a> to set.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2740159"></a><h3>
<a name="pango-context-get-font-map"></a>pango_context_get_font_map ()</h3>
<a class="indexterm" name="id2740175"></a><pre class="programlisting"><a href="pango-Fonts.html#PangoFontMap">PangoFontMap</a>* pango_context_get_font_map (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);</pre>
<p>
Gets the <span class="type">PangoFontmap</span> used to look up fonts for this context.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the font map for the <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>. This value
is owned by Pango and should not be unreferenced.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2740267"></a><h3>
<a name="pango-context-get-font-description"></a>pango_context_get_font_description ()</h3>
<a class="indexterm" name="id2740281"></a><pre class="programlisting"><a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a>* pango_context_get_font_description
(<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);</pre>
<p>
Retrieve the default font description for the context.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a pointer to the context's default font description.
This value must not be modified or freed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2740353"></a><h3>
<a name="pango-context-set-font-description"></a>pango_context_set_font_description ()</h3>
<a class="indexterm" name="id2740367"></a><pre class="programlisting">void pango_context_set_font_description
(<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc);</pre>
<p>
Set the default font description for the context</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>desc</code></em> :</span></td>
<td> the new pango font description
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2740449"></a><h3>
<a name="pango-context-get-language"></a>pango_context_get_language ()</h3>
<a class="indexterm" name="id2740462"></a><pre class="programlisting"><a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a>* pango_context_get_language (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);</pre>
<p>
Retrieves the global language tag for the context.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the global language tag.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2740531"></a><h3>
<a name="pango-context-set-language"></a>pango_context_set_language ()</h3>
<a class="indexterm" name="id2740545"></a><pre class="programlisting">void pango_context_set_language (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);</pre>
<p>
Sets the global language tag for the context.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>language</code></em> :</span></td>
<td> the new language tag.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2740625"></a><h3>
<a name="pango-context-get-base-dir"></a>pango_context_get_base_dir ()</h3>
<a class="indexterm" name="id2740639"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> pango_context_get_base_dir (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);</pre>
<p>
Retrieves the base direction for the context. See
<a href="pango-Text-Processing.html#pango-context-set-base-dir"><code class="function">pango_context_set_base_dir()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the base direction for the context.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2740720"></a><h3>
<a name="pango-context-set-base-dir"></a>pango_context_set_base_dir ()</h3>
<a class="indexterm" name="id2740732"></a><pre class="programlisting">void pango_context_set_base_dir (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
<a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> direction);</pre>
<p>
Sets the base direction for the context.
</p>
<p>
The base direction is used in applying the Unicode bidirectional
algorithm; if the <em class="parameter"><code>direction</code></em> is <a href="pango-Text-Processing.html#PANGO-DIRECTION-LTR:CAPS"><code class="literal">PANGO_DIRECTION_LTR</code></a> or
<a href="pango-Text-Processing.html#PANGO-DIRECTION-RTL:CAPS"><code class="literal">PANGO_DIRECTION_RTL</code></a>, then the value will be used as the paragraph
direction in the Unicode bidirectional algorithm. A value of
<a href="pango-Text-Processing.html#PANGO-DIRECTION-WEAK-LTR:CAPS"><code class="literal">PANGO_DIRECTION_WEAK_LTR</code></a> or <a href="pango-Text-Processing.html#PANGO-DIRECTION-WEAK-RTL:CAPS"><code class="literal">PANGO_DIRECTION_WEAK_RTL</code></a> is used only
for paragraphs that do not contain any strong characters themselves.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>direction</code></em> :</span></td>
<td> the new base direction
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2740872"></a><h3>
<a name="pango-context-get-matrix"></a>pango_context_get_matrix ()</h3>
<a class="indexterm" name="id2740887"></a><pre class="programlisting">const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a>* pango_context_get_matrix (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context);</pre>
<p>
Gets the transformation matrix that will be applied when
rendering with this context. See <a href="pango-Text-Processing.html#pango-context-set-matrix"><code class="function">pango_context_set_matrix()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the matrix, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if no matrix has been set
(which is the same as the identity matrix). The returned
matrix is owned by Pango and must not be modified or
freed.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2740985"></a><h3>
<a name="pango-context-set-matrix"></a>pango_context_set_matrix ()</h3>
<a class="indexterm" name="id2741000"></a><pre class="programlisting">void pango_context_set_matrix (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
const <a href="pango-Glyph-Storage.html#PangoMatrix">PangoMatrix</a> *matrix);</pre>
<p>
Sets the transformation matrix that will be applied when rendering
with this context. Note that reported metrics are in the user space
coordinates before the application of the matrix, not device-space
coordiantes after the application of the matrix. So, they don't scale
with the matrix, though they may change slightly for different
matrices, depending on how the text is fit to the pixel grid.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>matrix</code></em> :</span></td>
<td> a <a href="pango-Glyph-Storage.html#PangoMatrix"><span class="type">PangoMatrix</span></a>, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> to unset any existing matrix.
(No matrix set is the same as setting the identity matrix.)
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.6
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2741110"></a><h3>
<a name="pango-context-load-font"></a>pango_context_load_font ()</h3>
<a class="indexterm" name="id2741123"></a><pre class="programlisting"><a href="pango-Fonts.html#PangoFont">PangoFont</a>* pango_context_load_font (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc);</pre>
<p>
Loads the font in one of the fontmaps in the context
that is the closest match for <em class="parameter"><code>desc</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>desc</code></em> :</span></td>
<td> a <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> describing the font to load
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the font loaded, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if no font matched.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2741240"></a><h3>
<a name="pango-context-load-fontset"></a>pango_context_load_fontset ()</h3>
<a class="indexterm" name="id2741254"></a><pre class="programlisting"><a href="pango-Fonts.html#PangoFontset">PangoFontset</a>* pango_context_load_fontset (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc,
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);</pre>
<p>
Load a set of fonts in the context that can be used to render
a font matching <em class="parameter"><code>desc</code></em>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>desc</code></em> :</span></td>
<td> a <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> describing the fonts to load
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>language</code></em> :</span></td>
<td> a <a href="pango-Text-Attributes.html#PangoLanguage"><span class="type">PangoLanguage</span></a> the fonts will be used for
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td>the fontset, or <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> if no font matched.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2741402"></a><h3>
<a name="pango-context-get-metrics"></a>pango_context_get_metrics ()</h3>
<a class="indexterm" name="id2741415"></a><pre class="programlisting"><a href="pango-Fonts.html#PangoFontMetrics">PangoFontMetrics</a>* pango_context_get_metrics (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
const <a href="pango-Fonts.html#PangoFontDescription">PangoFontDescription</a> *desc,
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language);</pre>
<p>
Get overall metric information for a particular font
description. Since the metrics may be substantially different for
different scripts, a language tag can be provided to indicate that
the metrics should be retrieved that correspond to the script(s)
used by that language.
</p>
<p>
The <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> is interpreted in the same way as
by <a href="pango-Text-Processing.html#pango-itemize"><code class="function">pango_itemize()</code></a>, and the family name may be a comma separated
list of figures. If characters from multiple of these families
would be used to render the string, then the returned fonts would
be a composite of the metrics for the fonts loaded for the
individual families.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>desc</code></em> :</span></td>
<td> a <a href="pango-Fonts.html#PangoFontDescription"><span class="type">PangoFontDescription</span></a> structure
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>language</code></em> :</span></td>
<td> language tag used to determine which script to get the metrics
for. <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a> means that the language tag from the context will
be used. If no language tag is set on the ccontext, metrics
large enough to cover a range of languages will be returned.
The process of determining such metrics is slow, so it is best
to always make sure some real language tag will be used.
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> a <a href="pango-Fonts.html#PangoFontMetrics"><span class="type">PangoFontMetrics</span></a> object. The caller must call <a href="pango-Fonts.html#pango-font-metrics-unref"><code class="function">pango_font_metrics_unref()</code></a>
when finished using the object.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2741606"></a><h3>
<a name="pango-context-list-families"></a>pango_context_list_families ()</h3>
<a class="indexterm" name="id2741620"></a><pre class="programlisting">void pango_context_list_families (<a href="pango-Text-Processing.html#PangoContext">PangoContext</a> *context,
<a href="pango-Fonts.html#PangoFontFamily">PangoFontFamily</a> ***families,
int *n_families);</pre>
<p>
List all families for a context.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>context</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>families</code></em> :</span></td>
<td> location to store a pointer to an array of PangoFontFamily *.
This array should be freed with <a
href="../glib/glib-Memory-Allocation.html#g-free"
><code class="function">g_free()</code></a>.
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>n_families</code></em> :</span></td>
<td> location to store the number of elements in <em class="parameter"><code>descs</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2741740"></a><h3>
<a name="pango-get-mirror-char"></a>pango_get_mirror_char ()</h3>
<a class="indexterm" name="id2741755"></a><pre class="programlisting"><a
href="../glib/glib-Basic-Types.html#gboolean"
>gboolean</a> pango_get_mirror_char (<a
href="../glib/glib-Unicode-Manipulation.html#gunichar"
>gunichar</a> ch,
<a
href="../glib/glib-Unicode-Manipulation.html#gunichar"
>gunichar</a> *mirrored_ch);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">pango_get_mirror_char</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
If <em class="parameter"><code>ch</code></em> has the Unicode mirrored property and there is another Unicode
character that typically has a glyph that is the mirror image of <em class="parameter"><code>ch</code></em>'s
glyph, puts that character in the address pointed to by <em class="parameter"><code>mirrored_ch</code></em>.
</p>
<p>
Use <a
href="../glib/glib-Unicode-Manipulation.html#g-unichar-get-mirror-char"
><code class="function">g_unichar_get_mirror_char()</code></a> instead; the docs for that function
provide full details.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>ch</code></em> :</span></td>
<td> a Unicode character
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>mirrored_ch</code></em> :</span></td>
<td> location to store the mirrored character
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> <a
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
><code class="literal">TRUE</code></a> if <em class="parameter"><code>ch</code></em> has a mirrored character and <em class="parameter"><code>mirrored_ch</code></em> is
filled in, <a
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
><code class="literal">FALSE</code></a> otherwise
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2741920"></a><h3>
<a name="pango-unichar-direction"></a>pango_unichar_direction ()</h3>
<a class="indexterm" name="id2741932"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> pango_unichar_direction (<a
href="../glib/glib-Unicode-Manipulation.html#gunichar"
>gunichar</a> ch);</pre>
<p>
Determines the direction of a character; either
<a href="pango-Text-Processing.html#PANGO-DIRECTION-LTR:CAPS"><code class="literal">PANGO_DIRECTION_LTR</code></a>, <a href="pango-Text-Processing.html#PANGO-DIRECTION-RTL:CAPS"><code class="literal">PANGO_DIRECTION_RTL</code></a>, or
<a href="pango-Text-Processing.html#PANGO-DIRECTION-NEUTRAL:CAPS"><code class="literal">PANGO_DIRECTION_NEUTRAL</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>ch</code></em> :</span></td>
<td> a Unicode character
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> the direction of the character, as used in the
Unicode bidirectional algorithm.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2742028"></a><h3>
<a name="pango-find-base-dir"></a>pango_find_base_dir ()</h3>
<a class="indexterm" name="id2742043"></a><pre class="programlisting"><a href="pango-Text-Processing.html#PangoDirection">PangoDirection</a> pango_find_base_dir (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length);</pre>
<p>
Searches a string the first character that has a strong
direction, according to the Unicode bidirectional algorithm.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to process
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> length of <em class="parameter"><code>text</code></em> in bytes (may be -1 if <em class="parameter"><code>text</code></em> is nul-terminated)
</td>
</tr>
<tr>
<td>
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
<td> The direction corresponding to the first strong character.
If no such character is found, then <a href="pango-Text-Processing.html#PANGO-DIRECTION-NEUTRAL:CAPS"><code class="literal">PANGO_DIRECTION_NEUTRAL</code></a> is returned.
</td>
</tr>
</tbody>
</table></div>
<p>Since 1.4
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2742157"></a><h3>
<a name="pango-break"></a>pango_break ()</h3>
<a class="indexterm" name="id2742169"></a><pre class="programlisting">void pango_break (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
int length,
<a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> *analysis,
<a href="pango-Text-Processing.html#PangoLogAttr">PangoLogAttr</a> *attrs,
int attrs_len);</pre>
<p>
Determines possible line, word, and character breaks
for a string of Unicode text with a single analysis. For most
purposes you may want to use <a href="pango-Text-Processing.html#pango-get-log-attrs"><code class="function">pango_get_log_attrs()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to process
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> length of <em class="parameter"><code>text</code></em> in bytes (may be -1 if <em class="parameter"><code>text</code></em> is nul-terminated)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>analysis</code></em> :</span></td>
<td> <a href="pango-Text-Processing.html#PangoAnalysis"><span class="type">PangoAnalysis</span></a> structure from <a href="pango-Text-Processing.html#pango-itemize"><code class="function">pango_itemize()</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attrs</code></em> :</span></td>
<td> an array to store character information in
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attrs_len</code></em> :</span></td>
<td> size of the array passed as <em class="parameter"><code>attrs</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2742355"></a><h3>
<a name="pango-get-log-attrs"></a>pango_get_log_attrs ()</h3>
<a class="indexterm" name="id2742368"></a><pre class="programlisting">void pango_get_log_attrs (const char *text,
int length,
int level,
<a href="pango-Text-Attributes.html#PangoLanguage">PangoLanguage</a> *language,
<a href="pango-Text-Processing.html#PangoLogAttr">PangoLogAttr</a> *log_attrs,
int attrs_len);</pre>
<p>
Computes a <a href="pango-Text-Processing.html#PangoLogAttr"><span class="type">PangoLogAttr</span></a> for each character in <em class="parameter"><code>text</code></em>. The <em class="parameter"><code>log_attrs</code></em>
array must have one <a href="pango-Text-Processing.html#PangoLogAttr"><span class="type">PangoLogAttr</span></a> for each position in <em class="parameter"><code>text</code></em>; if
<em class="parameter"><code>text</code></em> contains N characters, it has N+1 positions, including the
last position at the end of the text. <em class="parameter"><code>text</code></em> should be an entire
paragraph; logical attributes can't be computed without context
(for example you need to see spaces on either side of a word to know
the word is a word).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> text to process
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> length in bytes of <em class="parameter"><code>text</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>level</code></em> :</span></td>
<td> embedding level, or -1 if unknown
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>language</code></em> :</span></td>
<td> language tag
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>log_attrs</code></em> :</span></td>
<td> array with one <a href="pango-Text-Processing.html#PangoLogAttr"><span class="type">PangoLogAttr</span></a> per character in <em class="parameter"><code>text</code></em>, plus one extra, to be filled in
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attrs_len</code></em> :</span></td>
<td> length of <em class="parameter"><code>log_attrs</code></em> array
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2742604"></a><h3>
<a name="pango-find-paragraph-boundary"></a>pango_find_paragraph_boundary ()</h3>
<a class="indexterm" name="id2742617"></a><pre class="programlisting">void pango_find_paragraph_boundary (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *paragraph_delimiter_index,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> *next_paragraph_start);</pre>
<p>
Locates a paragraph boundary in <em class="parameter"><code>text</code></em>. A boundary is caused by
delimiter characters, such as a newline, carriage return, carriage
return-newline pair, or Unicode paragraph separator character. The
index of the run of delimiters is returned in
<em class="parameter"><code>paragraph_delimiter_index</code></em>. The index of the start of the paragraph
(index after all delimiters) is stored in <em class="parameter"><code>next_paragraph_start</code></em>.
</p>
<p>
If no delimiters are found, both <em class="parameter"><code>paragraph_delimiter_index</code></em> and
<em class="parameter"><code>next_paragraph_start</code></em> are filled with the length of <em class="parameter"><code>text</code></em> (an index one
off the end).</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> UTF-8 text
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> length of <em class="parameter"><code>text</code></em> in bytes, or -1 if nul-terminated
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>paragraph_delimiter_index</code></em> :</span></td>
<td> return location for index of delimiter
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>next_paragraph_start</code></em> :</span></td>
<td> return location for start of next paragraph
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2742787"></a><h3>
<a name="pango-default-break"></a>pango_default_break ()</h3>
<a class="indexterm" name="id2742800"></a><pre class="programlisting">void pango_default_break (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
int length,
<a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> *analysis,
<a href="pango-Text-Processing.html#PangoLogAttr">PangoLogAttr</a> *attrs,
int attrs_len);</pre>
<p>
This is the default break algorithm, used if no language
engine overrides it. Normally you should use <a href="pango-Text-Processing.html#pango-break"><code class="function">pango_break()</code></a>
instead. Unlike <a href="pango-Text-Processing.html#pango-break"><code class="function">pango_break()</code></a>,
<em class="parameter"><code>analysis</code></em> can be <a
href="../glib/glib-Standard-Macros.html#NULL:CAPS"
><code class="literal">NULL</code></a>, but only do that if you know what
you're doing. If you need an analysis to pass to <a href="pango-Text-Processing.html#pango-break"><code class="function">pango_break()</code></a>,
you need to <a href="pango-Text-Processing.html#pango-itemize"><code class="function">pango_itemize()</code></a>. In most cases however you should
simply use <a href="pango-Text-Processing.html#pango-get-log-attrs"><code class="function">pango_get_log_attrs()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> text to break
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> length of text in bytes (may be -1 if <em class="parameter"><code>text</code></em> is nul-terminated)
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>analysis</code></em> :</span></td>
<td> a <a href="pango-Text-Processing.html#PangoAnalysis"><span class="type">PangoAnalysis</span></a> for the <em class="parameter"><code>text</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attrs</code></em> :</span></td>
<td> logical attributes to fill in
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>attrs_len</code></em> :</span></td>
<td> size of the array passed as <em class="parameter"><code>attrs</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2743034"></a><h3>
<a name="PangoLogAttr"></a>PangoLogAttr</h3>
<a class="indexterm" name="id2743047"></a><pre class="programlisting">typedef struct {
guint is_line_break : 1; /* Can break line in front of character */
guint is_mandatory_break : 1; /* Must break line in front of character */
guint is_char_break : 1; /* Can break here when doing char wrap */
guint is_white : 1; /* Whitespace character */
/* cursor can appear in front of character (i.e. this is a grapheme
* boundary, or the first character in the text)
*/
guint is_cursor_position : 1;
/* Note that in degenerate cases, you could have both start/end set on
* some text, most likely for sentences (e.g. no space after a period, so
* the next sentence starts right away)
*/
guint is_word_start : 1; /* first character in a word */
guint is_word_end : 1; /* is first non-word char after a word */
/* There are two ways to divide sentences. The first assigns all
* intersentence whitespace/control/format chars to some sentence,
* so all chars are in some sentence; is_sentence_boundary denotes
* the boundaries there. The second way doesn't assign
* between-sentence spaces, etc. to any sentence, so
* is_sentence_start/is_sentence_end mark the boundaries of those
* sentences.
*/
guint is_sentence_boundary : 1;
guint is_sentence_start : 1; /* first character in a sentence */
guint is_sentence_end : 1; /* first non-sentence char after a sentence */
/* if set, backspace deletes one character rather than
* the entire grapheme cluster
*/
guint backspace_deletes_character : 1;
} PangoLogAttr;
</pre>
<p>
The <a href="pango-Text-Processing.html#PangoLogAttr"><span class="type">PangoLogAttr</span></a> structure stores information
about the attributes of a single character.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>is_line_break</code></em> : 1;</span></td>
<td>if set, can break line in front of character
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>is_mandatory_break</code></em> : 1;</span></td>
<td>if set, must break line in front of character
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>is_char_break</code></em> : 1;</span></td>
<td>if set, can break here when doing character wrapping
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>is_white</code></em> : 1;</span></td>
<td>is whitespace character
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>is_cursor_position</code></em> : 1;</span></td>
<td>if set, cursor can appear in front of character.
i.e. this is a grapheme boundary, or the first character
in the text.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>is_word_start</code></em> : 1;</span></td>
<td>is first character in a word
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>is_word_end</code></em> : 1;</span></td>
<td>is first non-word char after a word
Note that in degenerate cases, you could have both <em class="parameter"><code>is_word_start</code></em>
and <em class="parameter"><code>is_word_end</code></em> set for some character.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>is_sentence_boundary</code></em> : 1;</span></td>
<td>is a sentence boundary.
There are two ways to divide sentences. The first assigns all
intersentence whitespace/control/format chars to some sentence,
so all chars are in some sentence; <em class="parameter"><code>is_sentence_boundary</code></em> denotes
the boundaries there. The second way doesn't assign
between-sentence spaces, etc. to any sentence, so
<em class="parameter"><code>is_sentence_start</code></em>/<em class="parameter"><code>is_sentence_end</code></em> mark the boundaries
of those sentences.
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>is_sentence_start</code></em> : 1;</span></td>
<td>is first character in a sentence
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>is_sentence_end</code></em> : 1;</span></td>
<td>is first char after a sentence.
Note that in degenerate cases, you could have both <em class="parameter"><code>is_sentence_start</code></em>
and <em class="parameter"><code>is_sentence_end</code></em> set for some character. (e.g. no space after a
period, so the next sentence starts right away)
</td>
</tr>
<tr>
<td>
<span class="term"><a
href="../glib/glib-Basic-Types.html#guint"
>guint</a> <em class="structfield"><code>backspace_deletes_character</code></em> : 1;</span></td>
<td>if set, backspace deletes one character
rather than the entire grapheme cluster. This
field is only meaningful on grapheme
boundaries (where <em class="parameter"><code>is_cursor_position</code></em> is
set). In some languages, the full grapheme
(e.g. letter + diacritics) is considered a
unit, while in others, each decomposed
character in the grapheme is a unit. In the
default implementation of <a href="pango-Text-Processing.html#pango-break"><code class="function">pango_break()</code></a>, this
bit is set on all grapheme boundaries except
those following Latin, Cyrillic or Greek base
characters.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="id2743417"></a><h3>
<a name="pango-shape"></a>pango_shape ()</h3>
<a class="indexterm" name="id2743429"></a><pre class="programlisting">void pango_shape (const <a
href="../glib/glib-Basic-Types.html#gchar"
>gchar</a> *text,
<a
href="../glib/glib-Basic-Types.html#gint"
>gint</a> length,
const <a href="pango-Text-Processing.html#PangoAnalysis">PangoAnalysis</a> *analysis,
<a href="pango-Glyph-Storage.html#PangoGlyphString">PangoGlyphString</a> *glyphs);</pre>
<p>
Given a segment of text and the corresponding
<a href="pango-Text-Processing.html#PangoAnalysis"><span class="type">PangoAnalysis</span></a> structure returned from <a href="pango-Text-Processing.html#pango-itemize"><code class="function">pango_itemize()</code></a>,
convert the characters into glyphs. You may also pass
in only a substring of the item from <a href="pango-Text-Processing.html#pango-itemize"><code class="function">pango_itemize()</code></a>.</p>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td>
<span class="term"><em class="parameter"><code>text</code></em> :</span></td>
<td> the text to process
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>length</code></em> :</span></td>
<td> the length (in bytes) of <em class="parameter"><code>text</code></em>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>analysis</code></em> :</span></td>
<td> <a href="pango-Text-Processing.html#PangoAnalysis"><span class="type">PangoAnalysis</span></a> structure from <a href="pango-Text-Processing.html#pango-itemize"><code class="function">pango_itemize()</code></a>
</td>
</tr>
<tr>
<td>
<span class="term"><em class="parameter"><code>glyphs</code></em> :</span></td>
<td> glyph string in which to store results
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</body>
</html>