<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
  "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="pango-Contexts">
<refmeta>
<refentrytitle role="top_of_page" id="pango-Contexts.top_of_page">Contexts</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>PANGO Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Contexts</refname>
<refpurpose>Global context object</refpurpose>
</refnamediv>

<refsect1 id="pango-Contexts.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="PangoContext"><returnvalue>PangoContext</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-context-new">pango_context_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-changed">pango_context_changed</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-get-serial">pango_context_get_serial</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-set-font-map">pango_context_set_font_map</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoFontMap"><returnvalue>PangoFontMap</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-context-get-font-map">pango_context_get_font_map</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoFontDescription"><returnvalue>PangoFontDescription</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-context-get-font-description">pango_context_get_font_description</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-set-font-description">pango_context_set_font_description</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoLanguage"><returnvalue>PangoLanguage</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-context-get-language">pango_context_get_language</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-set-language">pango_context_set_language</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoDirection"><returnvalue>PangoDirection</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-get-base-dir">pango_context_get_base_dir</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-set-base-dir">pango_context_set_base_dir</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoGravity"><returnvalue>PangoGravity</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-get-base-gravity">pango_context_get_base_gravity</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-set-base-gravity">pango_context_set_base_gravity</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoGravity"><returnvalue>PangoGravity</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-get-gravity">pango_context_get_gravity</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoGravityHint"><returnvalue>PangoGravityHint</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-get-gravity-hint">pango_context_get_gravity_hint</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-set-gravity-hint">pango_context_set_gravity_hint</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type">const <link linkend="PangoMatrix"><returnvalue>PangoMatrix</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-context-get-matrix">pango_context_get_matrix</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-set-matrix">pango_context_set_matrix</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-get-round-glyph-positions">pango_context_get_round_glyph_positions</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-set-round-glyph-positions">pango_context_set_round_glyph_positions</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoFont"><returnvalue>PangoFont</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-context-load-font">pango_context_load_font</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoFontset"><returnvalue>PangoFontset</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-context-load-fontset">pango_context_load_fontset</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoFontMetrics"><returnvalue>PangoFontMetrics</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-context-get-metrics">pango_context_get_metrics</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-context-list-families">pango_context_list_families</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<anchor id="PangoContext"/><refsect1 id="pango-Contexts.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="PangoContext-struct">PangoContext</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="pango-Contexts.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> PangoContext
</screen>
</refsect1>


<refsect1 id="pango-Contexts.description" role="desc">
<title role="desc.title">Description</title>
<para>The <link linkend="PangoContext"><type>PangoContext</type></link> structure stores global information
influencing Pango's operation, such as the fontmap used
to look up fonts, and default values such as the default
language, default gravity, or default font.</para>

</refsect1>
<refsect1 id="pango-Contexts.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="pango-context-new" role="function">
<title>pango_context_new&#160;()</title>
<indexterm zone="pango-context-new"><primary>pango_context_new</primary></indexterm>
<programlisting language="C"><link linkend="PangoContext"><returnvalue>PangoContext</returnvalue></link>&#160;*
pango_context_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="PangoContext"><type>PangoContext</type></link> initialized to default values.</para>
<para>This function is not particularly useful as it should always
be followed by a <link linkend="pango-context-set-font-map"><function>pango_context_set_font_map()</function></link> call, and the
function <link linkend="pango-font-map-create-context"><function>pango_font_map_create_context()</function></link> does these two steps
together and hence users are recommended to use that.</para>
<para>If you are using Pango as part of a higher-level system,
that system may have it's own way of create a <link linkend="PangoContext"><type>PangoContext</type></link>.
For instance, the GTK+ toolkit has, among others,
<link linkend="gdk-pango-context-get-for-screen"><function>gdk_pango_context_get_for_screen()</function></link>, and
<link linkend="gtk-widget-get-pango-context"><function>gtk_widget_get_pango_context()</function></link>.  Use those instead.</para>
<refsect3 id="pango-context-new.returns" role="returns">
<title>Returns</title>
<para> the newly allocated <link linkend="PangoContext"><type>PangoContext</type></link>, which should
be freed with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.</para>
</refsect3></refsect2>
<refsect2 id="pango-context-changed" role="function" condition="since:1.32.4">
<title>pango_context_changed&#160;()</title>
<indexterm zone="pango-context-changed" role="1.32.4"><primary>pango_context_changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_context_changed (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>);</programlisting>
<para>Forces a change in the context, which will cause any <link linkend="PangoLayout"><type>PangoLayout</type></link>
using this context to re-layout.</para>
<para>This function is only useful when implementing a new backend
for Pango, something applications won't do. Backends should
call this function if they have attached extra data to the context
and such data is changed.</para>
<refsect3 id="pango-context-changed.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.32.4">1.32.4</link></para></refsect2>
<refsect2 id="pango-context-get-serial" role="function" condition="since:1.32.4">
<title>pango_context_get_serial&#160;()</title>
<indexterm zone="pango-context-get-serial" role="1.32.4"><primary>pango_context_get_serial</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
pango_context_get_serial (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>);</programlisting>
<para>Returns the current serial number of <parameter>context</parameter>
.  The serial number is
initialized to an small number larger than zero when a new context
is created and is increased whenever the context is changed using any
of the setter functions, or the <link linkend="PangoFontMap"><type>PangoFontMap</type></link> it uses to find fonts has
changed. The serial may wrap, but will never have the value 0. Since it
can wrap, never compare it with "less than", always use "not equals".</para>
<para>This can be used to automatically detect changes to a <link linkend="PangoContext"><type>PangoContext</type></link>, and
is only useful when implementing objects that need update when their
<link linkend="PangoContext"><type>PangoContext</type></link> changes, like <link linkend="PangoLayout"><type>PangoLayout</type></link>.</para>
<refsect3 id="pango-context-get-serial.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-context-get-serial.returns" role="returns">
<title>Returns</title>
<para> The current serial number of <parameter>context</parameter>
.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.32.4">1.32.4</link></para></refsect2>
<refsect2 id="pango-context-set-font-map" role="function">
<title>pango_context_set_font_map&#160;()</title>
<indexterm zone="pango-context-set-font-map"><primary>pango_context_set_font_map</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_context_set_font_map (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>,
                            <parameter><link linkend="PangoFontMap"><type>PangoFontMap</type></link> *font_map</parameter>);</programlisting>
<para>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 <link linkend="PangoContext"><type>PangoContext</type></link> obtained
via one of the recommended methods should already have a suitable font map.</para>
<refsect3 id="pango-context-set-font-map.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>font_map</para></entry>
<entry role="parameter_description"><para>the <link linkend="PangoFontMap"><type>PangoFontMap</type></link> to set.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="pango-context-get-font-map" role="function" condition="since:1.6">
<title>pango_context_get_font_map&#160;()</title>
<indexterm zone="pango-context-get-font-map" role="1.6"><primary>pango_context_get_font_map</primary></indexterm>
<programlisting language="C"><link linkend="PangoFontMap"><returnvalue>PangoFontMap</returnvalue></link>&#160;*
pango_context_get_font_map (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>);</programlisting>
<para>Gets the <link linkend="PangoFontMap"><type>PangoFontMap</type></link> used to look up fonts for this context.</para>
<refsect3 id="pango-context-get-font-map.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-context-get-font-map.returns" role="returns">
<title>Returns</title>
<para>the font map for the <link linkend="PangoContext"><type>PangoContext</type></link>.
This value is owned by Pango and should not be unreferenced. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="pango-context-get-font-description" role="function">
<title>pango_context_get_font_description&#160;()</title>
<indexterm zone="pango-context-get-font-description"><primary>pango_context_get_font_description</primary></indexterm>
<programlisting language="C"><link linkend="PangoFontDescription"><returnvalue>PangoFontDescription</returnvalue></link>&#160;*
pango_context_get_font_description (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>);</programlisting>
<para>Retrieve the default font description for the context.</para>
<refsect3 id="pango-context-get-font-description.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-context-get-font-description.returns" role="returns">
<title>Returns</title>
<para>a pointer to the context's default font
description. This value must not be modified or freed. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="pango-context-set-font-description" role="function">
<title>pango_context_set_font_description&#160;()</title>
<indexterm zone="pango-context-set-font-description"><primary>pango_context_set_font_description</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_context_set_font_description (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>,
                                    <parameter>const <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> *desc</parameter>);</programlisting>
<para>Set the default font description for the context</para>
<refsect3 id="pango-context-set-font-description.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>desc</para></entry>
<entry role="parameter_description"><para>the new pango font description</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="pango-context-get-language" role="function">
<title>pango_context_get_language&#160;()</title>
<indexterm zone="pango-context-get-language"><primary>pango_context_get_language</primary></indexterm>
<programlisting language="C"><link linkend="PangoLanguage"><returnvalue>PangoLanguage</returnvalue></link>&#160;*
pango_context_get_language (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>);</programlisting>
<para>Retrieves the global language tag for the context.</para>
<refsect3 id="pango-context-get-language.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-context-get-language.returns" role="returns">
<title>Returns</title>
<para> the global language tag.</para>
</refsect3></refsect2>
<refsect2 id="pango-context-set-language" role="function">
<title>pango_context_set_language&#160;()</title>
<indexterm zone="pango-context-set-language"><primary>pango_context_set_language</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_context_set_language (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>,
                            <parameter><link linkend="PangoLanguage"><type>PangoLanguage</type></link> *language</parameter>);</programlisting>
<para>Sets the global language tag for the context.  The default language
for the locale of the running process can be found using
<link linkend="pango-language-get-default"><function>pango_language_get_default()</function></link>.</para>
<refsect3 id="pango-context-set-language.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>language</para></entry>
<entry role="parameter_description"><para>the new language tag.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="pango-context-get-base-dir" role="function">
<title>pango_context_get_base_dir&#160;()</title>
<indexterm zone="pango-context-get-base-dir"><primary>pango_context_get_base_dir</primary></indexterm>
<programlisting language="C"><link linkend="PangoDirection"><returnvalue>PangoDirection</returnvalue></link>
pango_context_get_base_dir (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>);</programlisting>
<para>Retrieves the base direction for the context. See
<link linkend="pango-context-set-base-dir"><function>pango_context_set_base_dir()</function></link>.</para>
<refsect3 id="pango-context-get-base-dir.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-context-get-base-dir.returns" role="returns">
<title>Returns</title>
<para> the base direction for the context.</para>
</refsect3></refsect2>
<refsect2 id="pango-context-set-base-dir" role="function">
<title>pango_context_set_base_dir&#160;()</title>
<indexterm zone="pango-context-set-base-dir"><primary>pango_context_set_base_dir</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_context_set_base_dir (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>,
                            <parameter><link linkend="PangoDirection"><type>PangoDirection</type></link> direction</parameter>);</programlisting>
<para>Sets the base direction for the context.</para>
<para>The base direction is used in applying the Unicode bidirectional
algorithm; if the <parameter>direction</parameter>
 is <link linkend="PANGO-DIRECTION-LTR:CAPS"><literal>PANGO_DIRECTION_LTR</literal></link> or
<link linkend="PANGO-DIRECTION-RTL:CAPS"><literal>PANGO_DIRECTION_RTL</literal></link>, then the value will be used as the paragraph
direction in the Unicode bidirectional algorithm.  A value of
<link linkend="PANGO-DIRECTION-WEAK-LTR:CAPS"><literal>PANGO_DIRECTION_WEAK_LTR</literal></link> or <link linkend="PANGO-DIRECTION-WEAK-RTL:CAPS"><literal>PANGO_DIRECTION_WEAK_RTL</literal></link> is used only
for paragraphs that do not contain any strong characters themselves.</para>
<refsect3 id="pango-context-set-base-dir.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>direction</para></entry>
<entry role="parameter_description"><para>the new base direction</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="pango-context-get-base-gravity" role="function" condition="since:1.16">
<title>pango_context_get_base_gravity&#160;()</title>
<indexterm zone="pango-context-get-base-gravity" role="1.16"><primary>pango_context_get_base_gravity</primary></indexterm>
<programlisting language="C"><link linkend="PangoGravity"><returnvalue>PangoGravity</returnvalue></link>
pango_context_get_base_gravity (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>);</programlisting>
<para>Retrieves the base gravity for the context. See
<link linkend="pango-context-set-base-gravity"><function>pango_context_set_base_gravity()</function></link>.</para>
<refsect3 id="pango-context-get-base-gravity.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-context-get-base-gravity.returns" role="returns">
<title>Returns</title>
<para> the base gravity for the context.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.16">1.16</link></para></refsect2>
<refsect2 id="pango-context-set-base-gravity" role="function" condition="since:1.16">
<title>pango_context_set_base_gravity&#160;()</title>
<indexterm zone="pango-context-set-base-gravity" role="1.16"><primary>pango_context_set_base_gravity</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_context_set_base_gravity (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>,
                                <parameter><link linkend="PangoGravity"><type>PangoGravity</type></link> gravity</parameter>);</programlisting>
<para>Sets the base gravity for the context.</para>
<para>The base gravity is used in laying vertical text out.</para>
<refsect3 id="pango-context-set-base-gravity.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>gravity</para></entry>
<entry role="parameter_description"><para>the new base gravity</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.16">1.16</link></para></refsect2>
<refsect2 id="pango-context-get-gravity" role="function" condition="since:1.16">
<title>pango_context_get_gravity&#160;()</title>
<indexterm zone="pango-context-get-gravity" role="1.16"><primary>pango_context_get_gravity</primary></indexterm>
<programlisting language="C"><link linkend="PangoGravity"><returnvalue>PangoGravity</returnvalue></link>
pango_context_get_gravity (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>);</programlisting>
<para>Retrieves the gravity for the context. This is similar to
<link linkend="pango-context-get-base-gravity"><function>pango_context_get_base_gravity()</function></link>, except for when the base gravity
is <link linkend="PANGO-GRAVITY-AUTO:CAPS"><literal>PANGO_GRAVITY_AUTO</literal></link> for which <link linkend="pango-gravity-get-for-matrix"><function>pango_gravity_get_for_matrix()</function></link> is used
to return the gravity from the current context matrix.</para>
<refsect3 id="pango-context-get-gravity.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-context-get-gravity.returns" role="returns">
<title>Returns</title>
<para> the resolved gravity for the context.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.16">1.16</link></para></refsect2>
<refsect2 id="pango-context-get-gravity-hint" role="function" condition="since:1.16">
<title>pango_context_get_gravity_hint&#160;()</title>
<indexterm zone="pango-context-get-gravity-hint" role="1.16"><primary>pango_context_get_gravity_hint</primary></indexterm>
<programlisting language="C"><link linkend="PangoGravityHint"><returnvalue>PangoGravityHint</returnvalue></link>
pango_context_get_gravity_hint (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>);</programlisting>
<para>Retrieves the gravity hint for the context. See
<link linkend="pango-context-set-gravity-hint"><function>pango_context_set_gravity_hint()</function></link> for details.</para>
<refsect3 id="pango-context-get-gravity-hint.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-context-get-gravity-hint.returns" role="returns">
<title>Returns</title>
<para> the gravity hint for the context.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.16">1.16</link></para></refsect2>
<refsect2 id="pango-context-set-gravity-hint" role="function" condition="since:1.16">
<title>pango_context_set_gravity_hint&#160;()</title>
<indexterm zone="pango-context-set-gravity-hint" role="1.16"><primary>pango_context_set_gravity_hint</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_context_set_gravity_hint (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>,
                                <parameter><link linkend="PangoGravityHint"><type>PangoGravityHint</type></link> hint</parameter>);</programlisting>
<para>Sets the gravity hint for the context.</para>
<para>The gravity hint is used in laying vertical text out, and is only relevant
if gravity of the context as returned by <link linkend="pango-context-get-gravity"><function>pango_context_get_gravity()</function></link>
is set <link linkend="PANGO-GRAVITY-EAST:CAPS"><literal>PANGO_GRAVITY_EAST</literal></link> or <link linkend="PANGO-GRAVITY-WEST:CAPS"><literal>PANGO_GRAVITY_WEST</literal></link>.</para>
<refsect3 id="pango-context-set-gravity-hint.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>hint</para></entry>
<entry role="parameter_description"><para>the new gravity hint</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.16">1.16</link></para></refsect2>
<refsect2 id="pango-context-get-matrix" role="function" condition="since:1.6">
<title>pango_context_get_matrix&#160;()</title>
<indexterm zone="pango-context-get-matrix" role="1.6"><primary>pango_context_get_matrix</primary></indexterm>
<programlisting language="C">const <link linkend="PangoMatrix"><returnvalue>PangoMatrix</returnvalue></link>&#160;*
pango_context_get_matrix (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>);</programlisting>
<para>Gets the transformation matrix that will be applied when
rendering with this context. See <link linkend="pango-context-set-matrix"><function>pango_context_set_matrix()</function></link>.</para>
<refsect3 id="pango-context-get-matrix.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-context-get-matrix.returns" role="returns">
<title>Returns</title>
<para>the matrix, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> 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. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="pango-context-set-matrix" role="function" condition="since:1.6">
<title>pango_context_set_matrix&#160;()</title>
<indexterm zone="pango-context-set-matrix" role="1.6"><primary>pango_context_set_matrix</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_context_set_matrix (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>,
                          <parameter>const <link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>);</programlisting>
<para>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
coordinates 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.</para>
<refsect3 id="pango-context-set-matrix.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>matrix</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to unset any existing
matrix. (No matrix set is the same as setting the identity matrix.). </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="pango-context-get-round-glyph-positions" role="function" condition="since:1.44">
<title>pango_context_get_round_glyph_positions&#160;()</title>
<indexterm zone="pango-context-get-round-glyph-positions" role="1.44"><primary>pango_context_get_round_glyph_positions</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
pango_context_get_round_glyph_positions
                               (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>);</programlisting>
<para>Returns whether font rendering with this context should
round glyph positions and widths.</para>
<refsect3 id="pango-context-get-round-glyph-positions.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.44">1.44</link></para></refsect2>
<refsect2 id="pango-context-set-round-glyph-positions" role="function" condition="since:1.44">
<title>pango_context_set_round_glyph_positions&#160;()</title>
<indexterm zone="pango-context-set-round-glyph-positions" role="1.44"><primary>pango_context_set_round_glyph_positions</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_context_set_round_glyph_positions
                               (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>,
                                <parameter><link linkend="gboolean"><type>gboolean</type></link> round_positions</parameter>);</programlisting>
<para>Sets whether font rendering with this context should
round glyph positions and widths to integral positions,
in device units.</para>
<para>This is useful when the renderer can't handle subpixel
positioning of glyphs.</para>
<para>The default value is to round glyph positions, to remain
compatible with previous Pango behavior.</para>
<refsect3 id="pango-context-set-round-glyph-positions.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>round_positions</para></entry>
<entry role="parameter_description"><para>whether to round glyph positions</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.44">1.44</link></para></refsect2>
<refsect2 id="pango-context-load-font" role="function">
<title>pango_context_load_font&#160;()</title>
<indexterm zone="pango-context-load-font"><primary>pango_context_load_font</primary></indexterm>
<programlisting language="C"><link linkend="PangoFont"><returnvalue>PangoFont</returnvalue></link>&#160;*
pango_context_load_font (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>,
                         <parameter>const <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> *desc</parameter>);</programlisting>
<para>Loads the font in one of the fontmaps in the context
that is the closest match for <parameter>desc</parameter>
.</para>
<refsect3 id="pango-context-load-font.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>desc</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> describing the font to load</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-context-load-font.returns" role="returns">
<title>Returns</title>
<para>the newly allocated <link linkend="PangoFont"><type>PangoFont</type></link>
that was loaded, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if no font matched. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>][<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="pango-context-load-fontset" role="function">
<title>pango_context_load_fontset&#160;()</title>
<indexterm zone="pango-context-load-fontset"><primary>pango_context_load_fontset</primary></indexterm>
<programlisting language="C"><link linkend="PangoFontset"><returnvalue>PangoFontset</returnvalue></link>&#160;*
pango_context_load_fontset (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>,
                            <parameter>const <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> *desc</parameter>,
                            <parameter><link linkend="PangoLanguage"><type>PangoLanguage</type></link> *language</parameter>);</programlisting>
<para>Load a set of fonts in the context that can be used to render
a font matching <parameter>desc</parameter>
.</para>
<refsect3 id="pango-context-load-fontset.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>desc</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> describing the fonts to load</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>language</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoLanguage"><type>PangoLanguage</type></link> the fonts will be used for</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-context-load-fontset.returns" role="returns">
<title>Returns</title>
<para>the newly allocated
<link linkend="PangoFontset"><type>PangoFontset</type></link> loaded, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if no font matched. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>][<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="pango-context-get-metrics" role="function">
<title>pango_context_get_metrics&#160;()</title>
<indexterm zone="pango-context-get-metrics"><primary>pango_context_get_metrics</primary></indexterm>
<programlisting language="C"><link linkend="PangoFontMetrics"><returnvalue>PangoFontMetrics</returnvalue></link>&#160;*
pango_context_get_metrics (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>,
                           <parameter>const <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> *desc</parameter>,
                           <parameter><link linkend="PangoLanguage"><type>PangoLanguage</type></link> *language</parameter>);</programlisting>
<para>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.</para>
<para>The <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> is interpreted in the same way as
by <link linkend="pango-itemize"><function>pango_itemize()</function></link>, 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.</para>
<refsect3 id="pango-context-get-metrics.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>desc</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> structure.  <link linkend="NULL:CAPS"><literal>NULL</literal></link> means that the
font description from the context will be used. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>language</para></entry>
<entry role="parameter_description"><para>language tag used to determine which script to get
the metrics for. <link linkend="NULL:CAPS"><literal>NULL</literal></link> means that the language tag from the context
will be used. If no language tag is set on the context, metrics
for the default language (as determined by <link linkend="pango-language-get-default"><function>pango_language_get_default()</function></link>)
will be returned. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-context-get-metrics.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="PangoFontMetrics"><type>PangoFontMetrics</type></link> object. The caller must call <link linkend="pango-font-metrics-unref"><function>pango_font_metrics_unref()</function></link>
when finished using the object.</para>
</refsect3></refsect2>
<refsect2 id="pango-context-list-families" role="function">
<title>pango_context_list_families&#160;()</title>
<indexterm zone="pango-context-list-families"><primary>pango_context_list_families</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_context_list_families (<parameter><link linkend="PangoContext"><type>PangoContext</type></link> *context</parameter>,
                             <parameter><link linkend="PangoFontFamily"><type>PangoFontFamily</type></link> ***families</parameter>,
                             <parameter><link linkend="int"><type>int</type></link> *n_families</parameter>);</programlisting>
<para>List all families for a context.</para>
<refsect3 id="pango-context-list-families.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>context</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoContext"><type>PangoContext</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>families</para></entry>
<entry role="parameter_description"><para>location to store a pointer to
an array of <link linkend="PangoFontFamily"><type>PangoFontFamily</type></link> *. This array should be freed
with <link linkend="g-free"><function>g_free()</function></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>array</acronym> length=n_families][<acronym>transfer container</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>n_families</para></entry>
<entry role="parameter_description"><para>location to store the number of elements in <parameter>descs</parameter>
. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>

</refsect1>
<refsect1 id="pango-Contexts.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="PangoContext-struct" role="struct">
<title>PangoContext</title>
<indexterm zone="PangoContext-struct"><primary>PangoContext</primary></indexterm>
<programlisting language="C">typedef struct _PangoContext PangoContext;</programlisting>
<para>The <link linkend="PangoContext"><type>PangoContext</type></link> structure stores global information
used to control the itemization process.</para>
</refsect2>

</refsect1>

</refentry>
