<?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-Glyph-Storage">
<refmeta>
<refentrytitle role="top_of_page" id="pango-Glyph-Storage.top_of_page">Glyphs</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>PANGO Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Glyphs</refname>
<refpurpose>Structures for storing information about glyphs</refpurpose>
</refnamediv>

<refsect1 id="pango-Glyph-Storage.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-PIXELS:CAPS">PANGO_PIXELS</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-PIXELS-FLOOR:CAPS">PANGO_PIXELS_FLOOR</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-PIXELS-CEIL:CAPS">PANGO_PIXELS_CEIL</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-UNITS-ROUND:CAPS">PANGO_UNITS_ROUND</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="double"><returnvalue>double</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-units-to-double">pango_units_to_double</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="int"><returnvalue>int</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-units-from-double">pango_units_from_double</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-ASCENT:CAPS">PANGO_ASCENT</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-DESCENT:CAPS">PANGO_DESCENT</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-LBEARING:CAPS">PANGO_LBEARING</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-RBEARING:CAPS">PANGO_RBEARING</link><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-extents-to-pixels">pango_extents_to_pixels</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoMatrix"><returnvalue>PangoMatrix</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-matrix-copy">pango_matrix_copy</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-matrix-free">pango_matrix_free</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-matrix-translate">pango_matrix_translate</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-matrix-scale">pango_matrix_scale</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-matrix-rotate">pango_matrix_rotate</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-matrix-concat">pango_matrix_concat</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-matrix-transform-point">pango_matrix_transform_point</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-matrix-transform-distance">pango_matrix_transform_distance</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-matrix-transform-rectangle">pango_matrix_transform_rectangle</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-matrix-transform-pixel-rectangle">pango_matrix_transform_pixel_rectangle</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="double"><returnvalue>double</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-matrix-get-font-scale-factor">pango_matrix_get_font_scale_factor</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-matrix-get-font-scale-factors">pango_matrix_get_font_scale_factors</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-GET-UNKNOWN-GLYPH:CAPS">PANGO_GET_UNKNOWN_GLYPH</link><phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoGlyphString"><returnvalue>PangoGlyphString</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-glyph-string-new">pango_glyph_string_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoGlyphString"><returnvalue>PangoGlyphString</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-glyph-string-copy">pango_glyph_string_copy</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-glyph-string-set-size">pango_glyph_string_set_size</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-glyph-string-free">pango_glyph_string_free</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-glyph-string-extents">pango_glyph_string_extents</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-glyph-string-extents-range">pango_glyph_string_extents_range</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="int"><returnvalue>int</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-glyph-string-get-width">pango_glyph_string_get_width</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-glyph-string-index-to-x">pango_glyph_string_index_to_x</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-glyph-string-x-to-index">pango_glyph_string_x_to_index</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-glyph-string-get-logical-widths">pango_glyph_string_get_logical_widths</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoGlyphItem"><returnvalue>PangoGlyphItem</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-glyph-item-copy">pango_glyph_item_copy</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-glyph-item-free">pango_glyph_item_free</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoGlyphItem"><returnvalue>PangoGlyphItem</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-glyph-item-split">pango_glyph_item_split</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GSList"><returnvalue>GSList</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-glyph-item-apply-attrs">pango_glyph_item_apply_attrs</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-glyph-item-letter-space">pango_glyph_item_letter_space</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-glyph-item-get-logical-widths">pango_glyph_item_get_logical_widths</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoGlyphItemIter"><returnvalue>PangoGlyphItemIter</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-glyph-item-iter-copy">pango_glyph_item_iter_copy</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-glyph-item-iter-free">pango_glyph_item_iter_free</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-glyph-item-iter-init-start">pango_glyph_item_iter_init_start</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-glyph-item-iter-init-end">pango_glyph_item_iter_init_end</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-glyph-item-iter-next-cluster">pango_glyph_item_iter_next_cluster</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-glyph-item-iter-prev-cluster">pango_glyph_item_iter_prev_cluster</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<anchor id="PangoMatrix"/><anchor id="PangoGlyphString"/><anchor id="PangoGlyphItem"/><anchor id="PangoGlyphItemIter"/><refsect1 id="pango-Glyph-Storage.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="name" colwidth="150px"/>
<colspec colname="description"/>
<tbody>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-SCALE:CAPS">PANGO_SCALE</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="PangoRectangle">PangoRectangle</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="PangoMatrix-struct">PangoMatrix</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-TYPE-MATRIX:CAPS">PANGO_TYPE_MATRIX</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-MATRIX-INIT:CAPS">PANGO_MATRIX_INIT</link></entry></row>
<row><entry role="typedef_keyword">typedef</entry><entry role="function_name"><link linkend="PangoGlyph">PangoGlyph</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-GLYPH-EMPTY:CAPS">PANGO_GLYPH_EMPTY</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-GLYPH-INVALID-INPUT:CAPS">PANGO_GLYPH_INVALID_INPUT</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-GLYPH-UNKNOWN-FLAG:CAPS">PANGO_GLYPH_UNKNOWN_FLAG</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="PangoGlyphInfo">PangoGlyphInfo</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="PangoGlyphGeometry">PangoGlyphGeometry</link></entry></row>
<row><entry role="typedef_keyword">typedef</entry><entry role="function_name"><link linkend="PangoGlyphUnit">PangoGlyphUnit</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="PangoGlyphVisAttr">PangoGlyphVisAttr</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="PangoGlyphString-struct">PangoGlyphString</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="PangoGlyphItem-struct">PangoGlyphItem</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="PangoGlyphItemIter-struct">PangoGlyphItemIter</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-TYPE-GLYPH-STRING:CAPS">PANGO_TYPE_GLYPH_STRING</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-TYPE-GLYPH-ITEM:CAPS">PANGO_TYPE_GLYPH_ITEM</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="PANGO-TYPE-GLYPH-ITEM-ITER:CAPS">PANGO_TYPE_GLYPH_ITEM_ITER</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="pango-Glyph-Storage.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GBoxed">GBoxed</link>
    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> PangoGlyphItem
    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> PangoGlyphItemIter
    <phrase role="lineart">&#9500;&#9472;&#9472;</phrase> PangoGlyphString
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> PangoMatrix
</screen>
</refsect1>


<refsect1 id="pango-Glyph-Storage.description" role="desc">
<title role="desc.title">Description</title>
<para>pango_shape() produces a string of glyphs which
can be measured or drawn to the screen. The following
structures are used to store information about
glyphs.</para>

</refsect1>
<refsect1 id="pango-Glyph-Storage.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="PANGO-PIXELS:CAPS" role="macro">
<title>PANGO_PIXELS()</title>
<indexterm zone="PANGO-PIXELS:CAPS"><primary>PANGO_PIXELS</primary></indexterm>
<programlisting language="C">#define PANGO_PIXELS(d) (((int)(d) + 512) &gt;&gt; 10)
</programlisting>
<para>Converts a dimension to device units by rounding.</para>
<refsect3 id="PANGO-PIXELS.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>d</para></entry>
<entry role="parameter_description"><para>a dimension in Pango units.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="PANGO-PIXELS.returns" role="returns">
<title>Returns</title>
<para> rounded dimension in device units.</para>
</refsect3></refsect2>
<refsect2 id="PANGO-PIXELS-FLOOR:CAPS" role="macro" condition="since:1.14">
<title>PANGO_PIXELS_FLOOR()</title>
<indexterm zone="PANGO-PIXELS-FLOOR:CAPS" role="1.14"><primary>PANGO_PIXELS_FLOOR</primary></indexterm>
<programlisting language="C">#define PANGO_PIXELS_FLOOR(d) (((int)(d)) &gt;&gt; 10)
</programlisting>
<para>Converts a dimension to device units by flooring.</para>
<refsect3 id="PANGO-PIXELS-FLOOR.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>d</para></entry>
<entry role="parameter_description"><para>a dimension in Pango units.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="PANGO-PIXELS-FLOOR.returns" role="returns">
<title>Returns</title>
<para> floored dimension in device units.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.14">1.14</link></para></refsect2>
<refsect2 id="PANGO-PIXELS-CEIL:CAPS" role="macro" condition="since:1.14">
<title>PANGO_PIXELS_CEIL()</title>
<indexterm zone="PANGO-PIXELS-CEIL:CAPS" role="1.14"><primary>PANGO_PIXELS_CEIL</primary></indexterm>
<programlisting language="C">#define PANGO_PIXELS_CEIL(d) (((int)(d) + 1023) &gt;&gt; 10)
</programlisting>
<para>Converts a dimension to device units by ceiling.</para>
<refsect3 id="PANGO-PIXELS-CEIL.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>d</para></entry>
<entry role="parameter_description"><para>a dimension in Pango units.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="PANGO-PIXELS-CEIL.returns" role="returns">
<title>Returns</title>
<para> ceiled dimension in device units.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.14">1.14</link></para></refsect2>
<refsect2 id="PANGO-UNITS-ROUND:CAPS" role="macro" condition="since:1.18">
<title>PANGO_UNITS_ROUND()</title>
<indexterm zone="PANGO-UNITS-ROUND:CAPS" role="1.18"><primary>PANGO_UNITS_ROUND</primary></indexterm>
<programlisting language="C">#define             PANGO_UNITS_ROUND(d)</programlisting>
<para>Rounds a dimension to whole device units, but does not
convert it to device units.</para>
<refsect3 id="PANGO-UNITS-ROUND.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>d</para></entry>
<entry role="parameter_description"><para>a dimension in Pango units.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="PANGO-UNITS-ROUND.returns" role="returns">
<title>Returns</title>
<para> rounded dimension in Pango units.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.18">1.18</link></para></refsect2>
<refsect2 id="pango-units-to-double" role="function" condition="since:1.16">
<title>pango_units_to_double&#160;()</title>
<indexterm zone="pango-units-to-double" role="1.16"><primary>pango_units_to_double</primary></indexterm>
<programlisting language="C"><link linkend="double"><returnvalue>double</returnvalue></link>
pango_units_to_double (<parameter><link linkend="int"><type>int</type></link> i</parameter>);</programlisting>
<para>Converts a number in Pango units to floating-point: divides
it by <link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link>.</para>
<refsect3 id="pango-units-to-double.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>i</para></entry>
<entry role="parameter_description"><para>value in Pango units</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-units-to-double.returns" role="returns">
<title>Returns</title>
<para> the double value.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.16">1.16</link></para></refsect2>
<refsect2 id="pango-units-from-double" role="function" condition="since:1.16">
<title>pango_units_from_double&#160;()</title>
<indexterm zone="pango-units-from-double" role="1.16"><primary>pango_units_from_double</primary></indexterm>
<programlisting language="C"><link linkend="int"><returnvalue>int</returnvalue></link>
pango_units_from_double (<parameter><link linkend="double"><type>double</type></link> d</parameter>);</programlisting>
<para>Converts a floating-point number to Pango units: multiplies
it by <link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> and rounds to nearest integer.</para>
<refsect3 id="pango-units-from-double.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>d</para></entry>
<entry role="parameter_description"><para>double floating-point value</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-units-from-double.returns" role="returns">
<title>Returns</title>
<para> the value in Pango units.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.16">1.16</link></para></refsect2>
<refsect2 id="PANGO-ASCENT:CAPS" role="macro">
<title>PANGO_ASCENT()</title>
<indexterm zone="PANGO-ASCENT:CAPS"><primary>PANGO_ASCENT</primary></indexterm>
<programlisting language="C">#define PANGO_ASCENT(rect) (-(rect).y)
</programlisting>
<para>Extracts the <firstterm>ascent</firstterm> from a <link linkend="PangoRectangle"><type>PangoRectangle</type></link>
representing glyph extents. The ascent is the distance from the
baseline to the highest point of the character. This is positive if the
glyph ascends above the baseline.</para>
<refsect3 id="PANGO-ASCENT.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>rect</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoRectangle"><type>PangoRectangle</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="PANGO-DESCENT:CAPS" role="macro">
<title>PANGO_DESCENT()</title>
<indexterm zone="PANGO-DESCENT:CAPS"><primary>PANGO_DESCENT</primary></indexterm>
<programlisting language="C">#define PANGO_DESCENT(rect) ((rect).y + (rect).height)
</programlisting>
<para>Extracts the <firstterm>descent</firstterm> from a <link linkend="PangoRectangle"><type>PangoRectangle</type></link>
representing glyph extents. The descent is the distance from the
baseline to the lowest point of the character. This is positive if the
glyph descends below the baseline.</para>
<refsect3 id="PANGO-DESCENT.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>rect</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoRectangle"><type>PangoRectangle</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="PANGO-LBEARING:CAPS" role="macro">
<title>PANGO_LBEARING()</title>
<indexterm zone="PANGO-LBEARING:CAPS"><primary>PANGO_LBEARING</primary></indexterm>
<programlisting language="C">#define PANGO_LBEARING(rect) ((rect).x)
</programlisting>
<para>Extracts the <firstterm>left bearing</firstterm> from a <link linkend="PangoRectangle"><type>PangoRectangle</type></link>
representing glyph extents. The left bearing is the distance from the
horizontal origin to the farthest left point of the character.
This is positive for characters drawn completely to the right of the
glyph origin.</para>
<refsect3 id="PANGO-LBEARING.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>rect</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoRectangle"><type>PangoRectangle</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="PANGO-RBEARING:CAPS" role="macro">
<title>PANGO_RBEARING()</title>
<indexterm zone="PANGO-RBEARING:CAPS"><primary>PANGO_RBEARING</primary></indexterm>
<programlisting language="C">#define PANGO_RBEARING(rect) ((rect).x + (rect).width)
</programlisting>
<para>Extracts the <firstterm>right bearing</firstterm> from a <link linkend="PangoRectangle"><type>PangoRectangle</type></link>
representing glyph extents. The right bearing is the distance from the
horizontal origin to the farthest right point of the character.
This is positive except for characters drawn completely to the left of the
horizontal origin.</para>
<refsect3 id="PANGO-RBEARING.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>rect</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoRectangle"><type>PangoRectangle</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="pango-extents-to-pixels" role="function" condition="since:1.16">
<title>pango_extents_to_pixels&#160;()</title>
<indexterm zone="pango-extents-to-pixels" role="1.16"><primary>pango_extents_to_pixels</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_extents_to_pixels (<parameter><link linkend="PangoRectangle"><type>PangoRectangle</type></link> *inclusive</parameter>,
                         <parameter><link linkend="PangoRectangle"><type>PangoRectangle</type></link> *nearest</parameter>);</programlisting>
<para>Converts extents from Pango units to device units, dividing by the
<link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> factor and performing rounding.</para>
<para>The <parameter>inclusive</parameter>
 rectangle is converted by flooring the x/y coordinates and extending
width/height, such that the final rectangle completely includes the original
rectangle.</para>
<para>The <parameter>nearest</parameter>
 rectangle is converted by rounding the coordinates
of the rectangle to the nearest device unit (pixel).</para>
<para>The rule to which argument to use is: if you want the resulting device-space
rectangle to completely contain the original rectangle, pass it in as <parameter>inclusive</parameter>
.
If you want two touching-but-not-overlapping rectangles stay
touching-but-not-overlapping after rounding to device units, pass them in
as <parameter>nearest</parameter>
.</para>
<refsect3 id="pango-extents-to-pixels.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>inclusive</para></entry>
<entry role="parameter_description"><para>rectangle to round to pixels inclusively, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>nearest</para></entry>
<entry role="parameter_description"><para>rectangle to round to nearest pixels, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </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.16">1.16</link></para></refsect2>
<refsect2 id="pango-matrix-copy" role="function" condition="since:1.6">
<title>pango_matrix_copy&#160;()</title>
<indexterm zone="pango-matrix-copy" role="1.6"><primary>pango_matrix_copy</primary></indexterm>
<programlisting language="C"><link linkend="PangoMatrix"><returnvalue>PangoMatrix</returnvalue></link>&#160;*
pango_matrix_copy (<parameter>const <link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>);</programlisting>
<para>Copies a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>.</para>
<refsect3 id="pango-matrix-copy.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>matrix</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-matrix-copy.returns" role="returns">
<title>Returns</title>
<para>the newly allocated <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, which
should be freed with <link linkend="pango-matrix-free"><function>pango_matrix_free()</function></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if
<parameter>matrix</parameter>
was <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </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-matrix-free" role="function" condition="since:1.6">
<title>pango_matrix_free&#160;()</title>
<indexterm zone="pango-matrix-free" role="1.6"><primary>pango_matrix_free</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_matrix_free (<parameter><link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>);</programlisting>
<para>Free a <link linkend="PangoMatrix"><type>PangoMatrix</type></link> created with <link linkend="pango-matrix-copy"><function>pango_matrix_copy()</function></link>.</para>
<refsect3 id="pango-matrix-free.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>matrix</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</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-matrix-translate" role="function" condition="since:1.6">
<title>pango_matrix_translate&#160;()</title>
<indexterm zone="pango-matrix-translate" role="1.6"><primary>pango_matrix_translate</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_matrix_translate (<parameter><link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>,
                        <parameter><link linkend="double"><type>double</type></link> tx</parameter>,
                        <parameter><link linkend="double"><type>double</type></link> ty</parameter>);</programlisting>
<para>Changes the transformation represented by <parameter>matrix</parameter>
 to be the
transformation given by first translating by (<parameter>tx</parameter>
, <parameter>ty</parameter>
)
then applying the original transformation.</para>
<refsect3 id="pango-matrix-translate.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>matrix</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoMatrix"><type>PangoMatrix</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>tx</para></entry>
<entry role="parameter_description"><para>amount to translate in the X direction</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>ty</para></entry>
<entry role="parameter_description"><para>amount to translate in the Y direction</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="pango-matrix-scale" role="function" condition="since:1.6">
<title>pango_matrix_scale&#160;()</title>
<indexterm zone="pango-matrix-scale" role="1.6"><primary>pango_matrix_scale</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_matrix_scale (<parameter><link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>,
                    <parameter><link linkend="double"><type>double</type></link> scale_x</parameter>,
                    <parameter><link linkend="double"><type>double</type></link> scale_y</parameter>);</programlisting>
<para>Changes the transformation represented by <parameter>matrix</parameter>
 to be the
transformation given by first scaling by <parameter>sx</parameter>
 in the X direction
and <parameter>sy</parameter>
 in the Y direction then applying the original
transformation.</para>
<refsect3 id="pango-matrix-scale.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>matrix</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoMatrix"><type>PangoMatrix</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>scale_x</para></entry>
<entry role="parameter_description"><para>amount to scale by in X direction</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>scale_y</para></entry>
<entry role="parameter_description"><para>amount to scale by in Y direction</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="pango-matrix-rotate" role="function" condition="since:1.6">
<title>pango_matrix_rotate&#160;()</title>
<indexterm zone="pango-matrix-rotate" role="1.6"><primary>pango_matrix_rotate</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_matrix_rotate (<parameter><link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>,
                     <parameter><link linkend="double"><type>double</type></link> degrees</parameter>);</programlisting>
<para>Changes the transformation represented by <parameter>matrix</parameter>
 to be the
transformation given by first rotating by <parameter>degrees</parameter>
 degrees
counter-clockwise then applying the original transformation.</para>
<refsect3 id="pango-matrix-rotate.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>matrix</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoMatrix"><type>PangoMatrix</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>degrees</para></entry>
<entry role="parameter_description"><para>degrees to rotate counter-clockwise</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="pango-matrix-concat" role="function" condition="since:1.6">
<title>pango_matrix_concat&#160;()</title>
<indexterm zone="pango-matrix-concat" role="1.6"><primary>pango_matrix_concat</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_matrix_concat (<parameter><link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>,
                     <parameter>const <link linkend="PangoMatrix"><type>PangoMatrix</type></link> *new_matrix</parameter>);</programlisting>
<para>Changes the transformation represented by <parameter>matrix</parameter>
 to be the
transformation given by first applying transformation
given by <parameter>new_matrix</parameter>
 then applying the original transformation.</para>
<refsect3 id="pango-matrix-concat.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>matrix</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoMatrix"><type>PangoMatrix</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>new_matrix</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoMatrix"><type>PangoMatrix</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="pango-matrix-transform-point" role="function" condition="since:1.16">
<title>pango_matrix_transform_point&#160;()</title>
<indexterm zone="pango-matrix-transform-point" role="1.16"><primary>pango_matrix_transform_point</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_matrix_transform_point (<parameter>const <link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>,
                              <parameter><link linkend="double"><type>double</type></link> *x</parameter>,
                              <parameter><link linkend="double"><type>double</type></link> *y</parameter>);</programlisting>
<para>Transforms the point (<parameter>x</parameter>
, <parameter>y</parameter>
) by <parameter>matrix</parameter>
.</para>
<refsect3 id="pango-matrix-transform-point.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>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>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>x</para></entry>
<entry role="parameter_description"><para>in/out X position. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>inout</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>y</para></entry>
<entry role="parameter_description"><para>in/out Y position. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>inout</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.16">1.16</link></para></refsect2>
<refsect2 id="pango-matrix-transform-distance" role="function" condition="since:1.16">
<title>pango_matrix_transform_distance&#160;()</title>
<indexterm zone="pango-matrix-transform-distance" role="1.16"><primary>pango_matrix_transform_distance</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_matrix_transform_distance (<parameter>const <link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>,
                                 <parameter><link linkend="double"><type>double</type></link> *dx</parameter>,
                                 <parameter><link linkend="double"><type>double</type></link> *dy</parameter>);</programlisting>
<para>Transforms the distance vector (<parameter>dx</parameter>
,<parameter>dy</parameter>
) by <parameter>matrix</parameter>
. This is
similar to <link linkend="pango-matrix-transform-point"><function>pango_matrix_transform_point()</function></link> except that the translation
components of the transformation are ignored. The calculation of
the returned vector is as follows:</para>
<programlisting>
dx2 = dx1 * xx + dy1 * xy;
dy2 = dx1 * yx + dy1 * yy;
</programlisting>
<para>Affine transformations are position invariant, so the same vector
always transforms to the same vector. If (<parameter>x1</parameter>
,<parameter>y1</parameter>
) transforms
to (<parameter>x2</parameter>
,<parameter>y2</parameter>
) then (<parameter>x1</parameter>
+<parameter>dx1</parameter>
,<parameter>y1</parameter>
+<parameter>dy1</parameter>
) will transform to
(<parameter>x1</parameter>
+<parameter>dx2</parameter>
,<parameter>y1</parameter>
+<parameter>dy2</parameter>
) for all values of <parameter>x1</parameter>
 and <parameter>x2</parameter>
.</para>
<refsect3 id="pango-matrix-transform-distance.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>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>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>dx</para></entry>
<entry role="parameter_description"><para>in/out X component of a distance vector. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>inout</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>dy</para></entry>
<entry role="parameter_description"><para>in/out Y component of a distance vector. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>inout</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.16">1.16</link></para></refsect2>
<refsect2 id="pango-matrix-transform-rectangle" role="function" condition="since:1.16">
<title>pango_matrix_transform_rectangle&#160;()</title>
<indexterm zone="pango-matrix-transform-rectangle" role="1.16"><primary>pango_matrix_transform_rectangle</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_matrix_transform_rectangle (<parameter>const <link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>,
                                  <parameter><link linkend="PangoRectangle"><type>PangoRectangle</type></link> *rect</parameter>);</programlisting>
<para>First transforms <parameter>rect</parameter>
 using <parameter>matrix</parameter>
, then calculates the bounding box
of the transformed rectangle.  The rectangle should be in Pango units.</para>
<para>This function is useful for example when you want to draw a rotated
<parameter>PangoLayout</parameter>
 to an image buffer, and want to know how large the image
should be and how much you should shift the layout when rendering.</para>
<para>If you have a rectangle in device units (pixels), use
<link linkend="pango-matrix-transform-pixel-rectangle"><function>pango_matrix_transform_pixel_rectangle()</function></link>.</para>
<para>If you have the rectangle in Pango units and want to convert to
transformed pixel bounding box, it is more accurate to transform it first
(using this function) and pass the result to <link linkend="pango-extents-to-pixels"><function>pango_extents_to_pixels()</function></link>,
first argument, for an inclusive rounded rectangle.
However, there are valid reasons that you may want to convert
to pixels first and then transform, for example when the transformed
coordinates may overflow in Pango units (large matrix translation for
example).</para>
<refsect3 id="pango-matrix-transform-rectangle.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>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>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>rect</para></entry>
<entry role="parameter_description"><para>in/out bounding box in Pango units, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>inout</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.16">1.16</link></para></refsect2>
<refsect2 id="pango-matrix-transform-pixel-rectangle" role="function" condition="since:1.16">
<title>pango_matrix_transform_pixel_rectangle&#160;()</title>
<indexterm zone="pango-matrix-transform-pixel-rectangle" role="1.16"><primary>pango_matrix_transform_pixel_rectangle</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_matrix_transform_pixel_rectangle
                               (<parameter>const <link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>,
                                <parameter><link linkend="PangoRectangle"><type>PangoRectangle</type></link> *rect</parameter>);</programlisting>
<para>First transforms the <parameter>rect</parameter>
 using <parameter>matrix</parameter>
, then calculates the bounding box
of the transformed rectangle.  The rectangle should be in device units
(pixels).</para>
<para>This function is useful for example when you want to draw a rotated
<parameter>PangoLayout</parameter>
 to an image buffer, and want to know how large the image
should be and how much you should shift the layout when rendering.</para>
<para>For better accuracy, you should use <link linkend="pango-matrix-transform-rectangle"><function>pango_matrix_transform_rectangle()</function></link> on
original rectangle in Pango units and convert to pixels afterward
using <link linkend="pango-extents-to-pixels"><function>pango_extents_to_pixels()</function></link>'s first argument.</para>
<refsect3 id="pango-matrix-transform-pixel-rectangle.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>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>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>rect</para></entry>
<entry role="parameter_description"><para>in/out bounding box in device units, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>inout</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.16">1.16</link></para></refsect2>
<refsect2 id="pango-matrix-get-font-scale-factor" role="function" condition="since:1.12">
<title>pango_matrix_get_font_scale_factor&#160;()</title>
<indexterm zone="pango-matrix-get-font-scale-factor" role="1.12"><primary>pango_matrix_get_font_scale_factor</primary></indexterm>
<programlisting language="C"><link linkend="double"><returnvalue>double</returnvalue></link>
pango_matrix_get_font_scale_factor (<parameter>const <link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>);</programlisting>
<para>Returns the scale factor of a matrix on the height of the font.
That is, the scale factor in the direction perpendicular to the
vector that the X coordinate is mapped to.  If the scale in the X
coordinate is needed as well, use <link linkend="pango-matrix-get-font-scale-factors"><function>pango_matrix_get_font_scale_factors()</function></link>.</para>
<refsect3 id="pango-matrix-get-font-scale-factor.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>matrix</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoMatrix"><type>PangoMatrix</type></link>, may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-matrix-get-font-scale-factor.returns" role="returns">
<title>Returns</title>
<para> the scale factor of <parameter>matrix</parameter>
on the height of the font,
or 1.0 if <parameter>matrix</parameter>
is <link linkend="NULL:CAPS"><literal>NULL</literal></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.12">1.12</link></para></refsect2>
<refsect2 id="pango-matrix-get-font-scale-factors" role="function" condition="since:1.38">
<title>pango_matrix_get_font_scale_factors&#160;()</title>
<indexterm zone="pango-matrix-get-font-scale-factors" role="1.38"><primary>pango_matrix_get_font_scale_factors</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_matrix_get_font_scale_factors (<parameter>const <link linkend="PangoMatrix"><type>PangoMatrix</type></link> *matrix</parameter>,
                                     <parameter><link linkend="double"><type>double</type></link> *xscale</parameter>,
                                     <parameter><link linkend="double"><type>double</type></link> *yscale</parameter>);</programlisting>
<para>Calculates the scale factor of a matrix on the width and height of the font.
That is, <parameter>xscale</parameter>
 is the scale factor in the direction of the X coordinate,
and <parameter>yscale</parameter>
 is the scale factor in the direction perpendicular to the
vector that the X coordinate is mapped to.</para>
<para>Note that output numbers will always be non-negative.</para>
<refsect3 id="pango-matrix-get-font-scale-factors.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>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>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>xscale</para></entry>
<entry role="parameter_description"><para>output scale factor in the x direction, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>yscale</para></entry>
<entry role="parameter_description"><para>output scale factor perpendicular to the x direction, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.38">1.38</link></para></refsect2>
<refsect2 id="PANGO-GET-UNKNOWN-GLYPH:CAPS" role="macro">
<title>PANGO_GET_UNKNOWN_GLYPH()</title>
<indexterm zone="PANGO-GET-UNKNOWN-GLYPH:CAPS"><primary>PANGO_GET_UNKNOWN_GLYPH</primary></indexterm>
<programlisting language="C">#define PANGO_GET_UNKNOWN_GLYPH(wc) ((PangoGlyph)(wc)|PANGO_GLYPH_UNKNOWN_FLAG)
</programlisting>
<para>The way this unknown glyphs are rendered is backend specific.  For example,
a box with the hexadecimal Unicode code-point of the character written in it
is what is done in the most common backends.</para>
<refsect3 id="PANGO-GET-UNKNOWN-GLYPH.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>wc</para></entry>
<entry role="parameter_description"><para>a Unicode character</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="PANGO-GET-UNKNOWN-GLYPH.returns" role="returns">
<title>Returns</title>
<para> a <link linkend="PangoGlyph"><type>PangoGlyph</type></link> value that means no glyph was found for <parameter>wc</parameter>
.</para>
</refsect3></refsect2>
<refsect2 id="pango-glyph-string-new" role="function">
<title>pango_glyph_string_new&#160;()</title>
<indexterm zone="pango-glyph-string-new"><primary>pango_glyph_string_new</primary></indexterm>
<programlisting language="C"><link linkend="PangoGlyphString"><returnvalue>PangoGlyphString</returnvalue></link>&#160;*
pango_glyph_string_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Create a new <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>.</para>
<refsect3 id="pango-glyph-string-new.returns" role="returns">
<title>Returns</title>
<para> the newly allocated <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>, which
should be freed with <link linkend="pango-glyph-string-free"><function>pango_glyph_string_free()</function></link>.</para>
</refsect3></refsect2>
<refsect2 id="pango-glyph-string-copy" role="function">
<title>pango_glyph_string_copy&#160;()</title>
<indexterm zone="pango-glyph-string-copy"><primary>pango_glyph_string_copy</primary></indexterm>
<programlisting language="C"><link linkend="PangoGlyphString"><returnvalue>PangoGlyphString</returnvalue></link>&#160;*
pango_glyph_string_copy (<parameter><link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> *string</parameter>);</programlisting>
<para>Copy a glyph string and associated storage.</para>
<refsect3 id="pango-glyph-string-copy.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>string</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>, may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-glyph-string-copy.returns" role="returns">
<title>Returns</title>
<para>the newly allocated <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>,
which should be freed with <link linkend="pango-glyph-string-free"><function>pango_glyph_string_free()</function></link>,
or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if <parameter>string</parameter>
was <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="pango-glyph-string-set-size" role="function">
<title>pango_glyph_string_set_size&#160;()</title>
<indexterm zone="pango-glyph-string-set-size"><primary>pango_glyph_string_set_size</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_glyph_string_set_size (<parameter><link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> *string</parameter>,
                             <parameter><link linkend="gint"><type>gint</type></link> new_len</parameter>);</programlisting>
<para>Resize a glyph string to the given length.</para>
<refsect3 id="pango-glyph-string-set-size.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>string</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>new_len</para></entry>
<entry role="parameter_description"><para>the new length of the string.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="pango-glyph-string-free" role="function">
<title>pango_glyph_string_free&#160;()</title>
<indexterm zone="pango-glyph-string-free"><primary>pango_glyph_string_free</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_glyph_string_free (<parameter><link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> *string</parameter>);</programlisting>
<para>Free a glyph string and associated storage.</para>
<refsect3 id="pango-glyph-string-free.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>string</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>, may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="pango-glyph-string-extents" role="function">
<title>pango_glyph_string_extents&#160;()</title>
<indexterm zone="pango-glyph-string-extents"><primary>pango_glyph_string_extents</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_glyph_string_extents (<parameter><link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> *glyphs</parameter>,
                            <parameter><link linkend="PangoFont"><type>PangoFont</type></link> *font</parameter>,
                            <parameter><link linkend="PangoRectangle"><type>PangoRectangle</type></link> *ink_rect</parameter>,
                            <parameter><link linkend="PangoRectangle"><type>PangoRectangle</type></link> *logical_rect</parameter>);</programlisting>
<para>Compute the logical and ink extents of a glyph string. See the documentation
for <link linkend="pango-font-get-glyph-extents"><function>pango_font_get_glyph_extents()</function></link> for details about the interpretation
of the rectangles.</para>
<para>Examples of logical (red) and ink (green) rects:</para>
<para><inlinemediaobject><imageobject><imagedata fileref="rects1.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject> <inlinemediaobject><imageobject><imagedata fileref="rects2.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
<refsect3 id="pango-glyph-string-extents.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>glyphs</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>font</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoFont"><type>PangoFont</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>ink_rect</para></entry>
<entry role="parameter_description"><para>rectangle used to store the extents of the glyph string
as drawn or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to indicate that the result is not needed. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>logical_rect</para></entry>
<entry role="parameter_description"><para>rectangle used to store the logical extents of the
glyph string or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to indicate that the result is not needed. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="pango-glyph-string-extents-range" role="function">
<title>pango_glyph_string_extents_range&#160;()</title>
<indexterm zone="pango-glyph-string-extents-range"><primary>pango_glyph_string_extents_range</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_glyph_string_extents_range (<parameter><link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> *glyphs</parameter>,
                                  <parameter><link linkend="int"><type>int</type></link> start</parameter>,
                                  <parameter><link linkend="int"><type>int</type></link> end</parameter>,
                                  <parameter><link linkend="PangoFont"><type>PangoFont</type></link> *font</parameter>,
                                  <parameter><link linkend="PangoRectangle"><type>PangoRectangle</type></link> *ink_rect</parameter>,
                                  <parameter><link linkend="PangoRectangle"><type>PangoRectangle</type></link> *logical_rect</parameter>);</programlisting>
<para>Computes the extents of a sub-portion of a glyph string. The extents are
relative to the start of the glyph string range (the origin of their
coordinate system is at the start of the range, not at the start of the entire
glyph string).</para>
<refsect3 id="pango-glyph-string-extents-range.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>glyphs</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>start</para></entry>
<entry role="parameter_description"><para>start index</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>end</para></entry>
<entry role="parameter_description"><para>end index (the range is the set of bytes with
indices such that start &lt;= index &lt; end)</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>font</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoFont"><type>PangoFont</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>ink_rect</para></entry>
<entry role="parameter_description"><para>rectangle used to
store the extents of the glyph string range as drawn or
<link linkend="NULL:CAPS"><literal>NULL</literal></link> to indicate that the result is not needed. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out caller-allocates</acronym>][<acronym>optional</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>logical_rect</para></entry>
<entry role="parameter_description"><para>rectangle used to
store the logical extents of the glyph string range or
<link linkend="NULL:CAPS"><literal>NULL</literal></link> to indicate that the result is not needed. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out caller-allocates</acronym>][<acronym>optional</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="pango-glyph-string-get-width" role="function" condition="since:1.14">
<title>pango_glyph_string_get_width&#160;()</title>
<indexterm zone="pango-glyph-string-get-width" role="1.14"><primary>pango_glyph_string_get_width</primary></indexterm>
<programlisting language="C"><link linkend="int"><returnvalue>int</returnvalue></link>
pango_glyph_string_get_width (<parameter><link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> *glyphs</parameter>);</programlisting>
<para>Computes the logical width of the glyph string as can also be computed
using <link linkend="pango-glyph-string-extents"><function>pango_glyph_string_extents()</function></link>.  However, since this only computes the
width, it's much faster.  This is in fact only a convenience function that
computes the sum of geometry.width for each glyph in the <parameter>glyphs</parameter>
.</para>
<refsect3 id="pango-glyph-string-get-width.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>glyphs</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-glyph-string-get-width.returns" role="returns">
<title>Returns</title>
<para> the logical width of the glyph string.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.14">1.14</link></para></refsect2>
<refsect2 id="pango-glyph-string-index-to-x" role="function">
<title>pango_glyph_string_index_to_x&#160;()</title>
<indexterm zone="pango-glyph-string-index-to-x"><primary>pango_glyph_string_index_to_x</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_glyph_string_index_to_x (<parameter><link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> *glyphs</parameter>,
                               <parameter><link linkend="char"><type>char</type></link> *text</parameter>,
                               <parameter><link linkend="int"><type>int</type></link> length</parameter>,
                               <parameter><link linkend="PangoAnalysis"><type>PangoAnalysis</type></link> *analysis</parameter>,
                               <parameter><link linkend="int"><type>int</type></link> index_</parameter>,
                               <parameter><link linkend="gboolean"><type>gboolean</type></link> trailing</parameter>,
                               <parameter><link linkend="int"><type>int</type></link> *x_pos</parameter>);</programlisting>
<para>Converts from character position to x position. (X position
is measured from the left edge of the run). Character positions
are computed by dividing up each cluster into equal portions.</para>
<refsect3 id="pango-glyph-string-index-to-x.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>glyphs</para></entry>
<entry role="parameter_description"><para>the glyphs return from <link linkend="pango-shape"><function>pango_shape()</function></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>the text for the run</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>length</para></entry>
<entry role="parameter_description"><para>the number of bytes (not characters) in <parameter>text</parameter>
.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>analysis</para></entry>
<entry role="parameter_description"><para>the analysis information return from <link linkend="pango-itemize"><function>pango_itemize()</function></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>index_</para></entry>
<entry role="parameter_description"><para>the byte index within <parameter>text</parameter>
</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>trailing</para></entry>
<entry role="parameter_description"><para>whether we should compute the result for the beginning (<link linkend="FALSE:CAPS"><literal>FALSE</literal></link>)
or end (<link linkend="TRUE:CAPS"><literal>TRUE</literal></link>) of the character.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x_pos</para></entry>
<entry role="parameter_description"><para>location to store result. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="pango-glyph-string-x-to-index" role="function">
<title>pango_glyph_string_x_to_index&#160;()</title>
<indexterm zone="pango-glyph-string-x-to-index"><primary>pango_glyph_string_x_to_index</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_glyph_string_x_to_index (<parameter><link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> *glyphs</parameter>,
                               <parameter><link linkend="char"><type>char</type></link> *text</parameter>,
                               <parameter><link linkend="int"><type>int</type></link> length</parameter>,
                               <parameter><link linkend="PangoAnalysis"><type>PangoAnalysis</type></link> *analysis</parameter>,
                               <parameter><link linkend="int"><type>int</type></link> x_pos</parameter>,
                               <parameter><link linkend="int"><type>int</type></link> *index_</parameter>,
                               <parameter><link linkend="int"><type>int</type></link> *trailing</parameter>);</programlisting>
<para>Convert from x offset to character position. Character positions
are computed by dividing up each cluster into equal portions.
In scripts where positioning within a cluster is not allowed
(such as Thai), the returned value may not be a valid cursor
position; the caller must combine the result with the logical
attributes for the text to compute the valid cursor position.</para>
<refsect3 id="pango-glyph-string-x-to-index.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>glyphs</para></entry>
<entry role="parameter_description"><para>the glyphs returned from <link linkend="pango-shape"><function>pango_shape()</function></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>the text for the run</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>length</para></entry>
<entry role="parameter_description"><para>the number of bytes (not characters) in text.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>analysis</para></entry>
<entry role="parameter_description"><para>the analysis information return from <link linkend="pango-itemize"><function>pango_itemize()</function></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>x_pos</para></entry>
<entry role="parameter_description"><para>the x offset (in Pango units)</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>index_</para></entry>
<entry role="parameter_description"><para>location to store calculated byte index within <parameter>text</parameter>
. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>trailing</para></entry>
<entry role="parameter_description"><para>location to store a boolean indicating
whether the user clicked on the leading or trailing
edge of the character. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="pango-glyph-string-get-logical-widths" role="function">
<title>pango_glyph_string_get_logical_widths&#160;()</title>
<indexterm zone="pango-glyph-string-get-logical-widths"><primary>pango_glyph_string_get_logical_widths</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_glyph_string_get_logical_widths (<parameter><link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> *glyphs</parameter>,
                                       <parameter>const <link linkend="char"><type>char</type></link> *text</parameter>,
                                       <parameter><link linkend="int"><type>int</type></link> length</parameter>,
                                       <parameter><link linkend="int"><type>int</type></link> embedding_level</parameter>,
                                       <parameter><link linkend="int"><type>int</type></link> *logical_widths</parameter>);</programlisting>
<para>Given a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> resulting from <link linkend="pango-shape"><function>pango_shape()</function></link> and the corresponding
text, determine the screen width corresponding to each character. When
multiple characters compose a single cluster, the width of the entire
cluster is divided equally among the characters.</para>
<para>See also <link linkend="pango-glyph-item-get-logical-widths"><function>pango_glyph_item_get_logical_widths()</function></link>.</para>
<refsect3 id="pango-glyph-string-get-logical-widths.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>glyphs</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>the text corresponding to the glyphs</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>length</para></entry>
<entry role="parameter_description"><para>the length of <parameter>text</parameter>
, in bytes</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>embedding_level</para></entry>
<entry role="parameter_description"><para>the embedding level of the string</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>logical_widths</para></entry>
<entry role="parameter_description"><para>an array whose length is the number of
characters in text (equal to g_utf8_strlen (text,
length) unless text has NUL bytes) to be filled in
with the resulting character widths. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="pango-glyph-item-copy" role="function" condition="since:1.20">
<title>pango_glyph_item_copy&#160;()</title>
<indexterm zone="pango-glyph-item-copy" role="1.20"><primary>pango_glyph_item_copy</primary></indexterm>
<programlisting language="C"><link linkend="PangoGlyphItem"><returnvalue>PangoGlyphItem</returnvalue></link>&#160;*
pango_glyph_item_copy (<parameter><link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> *orig</parameter>);</programlisting>
<para>Make a deep copy of an existing <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> structure.</para>
<refsect3 id="pango-glyph-item-copy.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>orig</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link>, may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-glyph-item-copy.returns" role="returns">
<title>Returns</title>
<para>the newly allocated <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link>, which should
be freed with <link linkend="pango-glyph-item-free"><function>pango_glyph_item_free()</function></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
if <parameter>orig</parameter>
was <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.20">1.20</link></para></refsect2>
<refsect2 id="pango-glyph-item-free" role="function" condition="since:1.6">
<title>pango_glyph_item_free&#160;()</title>
<indexterm zone="pango-glyph-item-free" role="1.6"><primary>pango_glyph_item_free</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_glyph_item_free (<parameter><link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> *glyph_item</parameter>);</programlisting>
<para>Frees a <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> and resources to which it points.</para>
<refsect3 id="pango-glyph-item-free.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>glyph_item</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link>, may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</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-glyph-item-split" role="function" condition="since:1.2">
<title>pango_glyph_item_split&#160;()</title>
<indexterm zone="pango-glyph-item-split" role="1.2"><primary>pango_glyph_item_split</primary></indexterm>
<programlisting language="C"><link linkend="PangoGlyphItem"><returnvalue>PangoGlyphItem</returnvalue></link>&#160;*
pango_glyph_item_split (<parameter><link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> *orig</parameter>,
                        <parameter>const <link linkend="char"><type>char</type></link> *text</parameter>,
                        <parameter><link linkend="int"><type>int</type></link> split_index</parameter>);</programlisting>
<para>Modifies <parameter>orig</parameter>
 to cover only the text after <parameter>split_index</parameter>
, and
returns a new item that covers the text before <parameter>split_index</parameter>
 that
used to be in <parameter>orig</parameter>
. You can think of <parameter>split_index</parameter>
 as the length of
the returned item. <parameter>split_index</parameter>
 may not be 0, and it may not be
greater than or equal to the length of <parameter>orig</parameter>
 (that is, there must
be at least one byte assigned to each item, you can't create a
zero-length item).</para>
<para>This function is similar in function to <link linkend="pango-item-split"><function>pango_item_split()</function></link> (and uses
it internally.)</para>
<refsect3 id="pango-glyph-item-split.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>orig</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoItem"><type>PangoItem</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>text to which positions in <parameter>orig</parameter>
apply</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>split_index</para></entry>
<entry role="parameter_description"><para>byte index of position to split item, relative to the start of the item</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-glyph-item-split.returns" role="returns">
<title>Returns</title>
<para> the newly allocated item representing text before
<parameter>split_index</parameter>
, which should be freed
with <link linkend="pango-glyph-item-free"><function>pango_glyph_item_free()</function></link>.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.2">1.2</link></para></refsect2>
<refsect2 id="pango-glyph-item-apply-attrs" role="function" condition="since:1.2">
<title>pango_glyph_item_apply_attrs&#160;()</title>
<indexterm zone="pango-glyph-item-apply-attrs" role="1.2"><primary>pango_glyph_item_apply_attrs</primary></indexterm>
<programlisting language="C"><link linkend="GSList"><returnvalue>GSList</returnvalue></link>&#160;*
pango_glyph_item_apply_attrs (<parameter><link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> *glyph_item</parameter>,
                              <parameter>const <link linkend="char"><type>char</type></link> *text</parameter>,
                              <parameter><link linkend="PangoAttrList"><type>PangoAttrList</type></link> *list</parameter>);</programlisting>
<para>Splits a shaped item (PangoGlyphItem) into multiple items based
on an attribute list. The idea is that if you have attributes
that don't affect shaping, such as color or underline, to avoid
affecting shaping, you filter them out (<link linkend="pango-attr-list-filter"><function>pango_attr_list_filter()</function></link>),
apply the shaping process and then reapply them to the result using
this function.</para>
<para>All attributes that start or end inside a cluster are applied
to that cluster; for instance, if half of a cluster is underlined
and the other-half strikethrough, then the cluster will end
up with both underline and strikethrough attributes. In these
cases, it may happen that item->extra_attrs for some of the
result items can have multiple attributes of the same type.</para>
<para>This function takes ownership of <parameter>glyph_item</parameter>
; it will be reused
as one of the elements in the list.</para>
<refsect3 id="pango-glyph-item-apply-attrs.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>glyph_item</para></entry>
<entry role="parameter_description"><para>a shaped item</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>text that <parameter>list</parameter>
applies to</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>list</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoAttrList"><type>PangoAttrList</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-glyph-item-apply-attrs.returns" role="returns">
<title>Returns</title>
<para>a
list of glyph items resulting from splitting <parameter>glyph_item</parameter>
. Free
the elements using <link linkend="pango-glyph-item-free"><function>pango_glyph_item_free()</function></link>, the list using
<link linkend="g-slist-free"><function>g_slist_free()</function></link>. </para>
<para><emphasis role="annotation">[<acronym>transfer full</acronym>][<acronym>element-type</acronym> Pango.GlyphItem]</emphasis></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.2">1.2</link></para></refsect2>
<refsect2 id="pango-glyph-item-letter-space" role="function" condition="since:1.6">
<title>pango_glyph_item_letter_space&#160;()</title>
<indexterm zone="pango-glyph-item-letter-space" role="1.6"><primary>pango_glyph_item_letter_space</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_glyph_item_letter_space (<parameter><link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> *glyph_item</parameter>,
                               <parameter>const <link linkend="char"><type>char</type></link> *text</parameter>,
                               <parameter><link linkend="PangoLogAttr"><type>PangoLogAttr</type></link> *log_attrs</parameter>,
                               <parameter><link linkend="int"><type>int</type></link> letter_spacing</parameter>);</programlisting>
<para>Adds spacing between the graphemes of <parameter>glyph_item</parameter>
 to
give the effect of typographic letter spacing.</para>
<refsect3 id="pango-glyph-item-letter-space.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>glyph_item</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>text that <parameter>glyph_item</parameter>
corresponds to
(glyph_item->item->offset is an offset from the
start of <parameter>text</parameter>
)</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>log_attrs</para></entry>
<entry role="parameter_description"><para>logical attributes for the item
(the first logical attribute refers to the position
before the first character in the item). </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>letter_spacing</para></entry>
<entry role="parameter_description"><para>amount of letter spacing to add
in Pango units. May be negative, though too large
negative values will give ugly results.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="pango-glyph-item-get-logical-widths" role="function" condition="since:1.26">
<title>pango_glyph_item_get_logical_widths&#160;()</title>
<indexterm zone="pango-glyph-item-get-logical-widths" role="1.26"><primary>pango_glyph_item_get_logical_widths</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_glyph_item_get_logical_widths (<parameter><link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> *glyph_item</parameter>,
                                     <parameter>const <link linkend="char"><type>char</type></link> *text</parameter>,
                                     <parameter><link linkend="int"><type>int</type></link> *logical_widths</parameter>);</programlisting>
<para>Given a <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> and the corresponding
text, determine the screen width corresponding to each character. When
multiple characters compose a single cluster, the width of the entire
cluster is divided equally among the characters.</para>
<para>See also <link linkend="pango-glyph-string-get-logical-widths"><function>pango_glyph_string_get_logical_widths()</function></link>.</para>
<refsect3 id="pango-glyph-item-get-logical-widths.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>glyph_item</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>text that <parameter>glyph_item</parameter>
corresponds to
(glyph_item->item->offset is an offset from the
start of <parameter>text</parameter>
)</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>logical_widths</para></entry>
<entry role="parameter_description"><para>an array whose length is the number of
characters in glyph_item (equal to
glyph_item->item->num_chars) to be filled in with
the resulting character widths. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>array</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.26">1.26</link></para></refsect2>
<refsect2 id="pango-glyph-item-iter-copy" role="function" condition="since:1.22">
<title>pango_glyph_item_iter_copy&#160;()</title>
<indexterm zone="pango-glyph-item-iter-copy" role="1.22"><primary>pango_glyph_item_iter_copy</primary></indexterm>
<programlisting language="C"><link linkend="PangoGlyphItemIter"><returnvalue>PangoGlyphItemIter</returnvalue></link>&#160;*
pango_glyph_item_iter_copy (<parameter><link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> *orig</parameter>);</programlisting>
<para>Make a shallow copy of an existing <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> structure.</para>
<refsect3 id="pango-glyph-item-iter-copy.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>orig</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link>, may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-glyph-item-iter-copy.returns" role="returns">
<title>Returns</title>
<para>the newly allocated <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link>, which should
be freed with <link linkend="pango-glyph-item-iter-free"><function>pango_glyph_item_iter_free()</function></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
if <parameter>orig</parameter>
was <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para>
<para><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>
<refsect2 id="pango-glyph-item-iter-free" role="function" condition="since:1.22">
<title>pango_glyph_item_iter_free&#160;()</title>
<indexterm zone="pango-glyph-item-iter-free" role="1.22"><primary>pango_glyph_item_iter_free</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
pango_glyph_item_iter_free (<parameter><link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> *iter</parameter>);</programlisting>
<para>Frees a <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> created by <link linkend="pango-glyph-item-iter-copy"><function>pango_glyph_item_iter_copy()</function></link>.</para>
<refsect3 id="pango-glyph-item-iter-free.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>iter</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link>, may be <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>
<refsect2 id="pango-glyph-item-iter-init-start" role="function" condition="since:1.22">
<title>pango_glyph_item_iter_init_start&#160;()</title>
<indexterm zone="pango-glyph-item-iter-init-start" role="1.22"><primary>pango_glyph_item_iter_init_start</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
pango_glyph_item_iter_init_start (<parameter><link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> *iter</parameter>,
                                  <parameter><link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> *glyph_item</parameter>,
                                  <parameter>const <link linkend="char"><type>char</type></link> *text</parameter>);</programlisting>
<para>Initializes a <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> structure to point to the
first cluster in a glyph item.
See <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> for details of cluster orders.</para>
<refsect3 id="pango-glyph-item-iter-init-start.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>iter</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>glyph_item</para></entry>
<entry role="parameter_description"><para>the glyph item to iterate over</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>text corresponding to the glyph item</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-glyph-item-iter-init-start.returns" role="returns">
<title>Returns</title>
<para> <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if there are no clusters in the glyph item</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>
<refsect2 id="pango-glyph-item-iter-init-end" role="function" condition="since:1.22">
<title>pango_glyph_item_iter_init_end&#160;()</title>
<indexterm zone="pango-glyph-item-iter-init-end" role="1.22"><primary>pango_glyph_item_iter_init_end</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
pango_glyph_item_iter_init_end (<parameter><link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> *iter</parameter>,
                                <parameter><link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> *glyph_item</parameter>,
                                <parameter>const <link linkend="char"><type>char</type></link> *text</parameter>);</programlisting>
<para>Initializes a <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> structure to point to the
last cluster in a glyph item.
See <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> for details of cluster orders.</para>
<refsect3 id="pango-glyph-item-iter-init-end.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>iter</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>glyph_item</para></entry>
<entry role="parameter_description"><para>the glyph item to iterate over</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>text</para></entry>
<entry role="parameter_description"><para>text corresponding to the glyph item</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-glyph-item-iter-init-end.returns" role="returns">
<title>Returns</title>
<para> <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if there are no clusters in the glyph item</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>
<refsect2 id="pango-glyph-item-iter-next-cluster" role="function" condition="since:1.22">
<title>pango_glyph_item_iter_next_cluster&#160;()</title>
<indexterm zone="pango-glyph-item-iter-next-cluster" role="1.22"><primary>pango_glyph_item_iter_next_cluster</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
pango_glyph_item_iter_next_cluster (<parameter><link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> *iter</parameter>);</programlisting>
<para>Advances the iterator to the next cluster in the glyph item.
See <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> for details of cluster orders.</para>
<refsect3 id="pango-glyph-item-iter-next-cluster.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>iter</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-glyph-item-iter-next-cluster.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the iterator was advanced, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if we were already on the
last cluster.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>
<refsect2 id="pango-glyph-item-iter-prev-cluster" role="function" condition="since:1.22">
<title>pango_glyph_item_iter_prev_cluster&#160;()</title>
<indexterm zone="pango-glyph-item-iter-prev-cluster" role="1.22"><primary>pango_glyph_item_iter_prev_cluster</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
pango_glyph_item_iter_prev_cluster (<parameter><link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> *iter</parameter>);</programlisting>
<para>Moves the iterator to the preceding cluster in the glyph item.
See <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> for details of cluster orders.</para>
<refsect3 id="pango-glyph-item-iter-prev-cluster.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>iter</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-glyph-item-iter-prev-cluster.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the iterator was moved, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if we were already on the
first cluster.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>

</refsect1>
<refsect1 id="pango-Glyph-Storage.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="PANGO-SCALE:CAPS" role="macro">
<title>PANGO_SCALE</title>
<indexterm zone="PANGO-SCALE:CAPS"><primary>PANGO_SCALE</primary></indexterm>
<programlisting language="C">#define PANGO_SCALE 1024
</programlisting>
<para>The <link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> macro represents the scale between dimensions used
for Pango distances and device units. (The definition of device
units is dependent on the output device; it will typically be pixels
for a screen, and points for a printer.) <link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> is currently
1024, but this may be changed in the future.</para>
<para>When setting font sizes, device units are always considered to be
points (as in "12 point font"), rather than pixels.</para>
</refsect2>
<refsect2 id="PangoRectangle" role="struct">
<title>struct PangoRectangle</title>
<indexterm zone="PangoRectangle"><primary>PangoRectangle</primary></indexterm>
<programlisting language="C">struct PangoRectangle {
  int x;
  int y;
  int width;
  int height;
};
</programlisting>
<para>The <link linkend="PangoRectangle"><type>PangoRectangle</type></link> structure represents a rectangle. It is frequently
used to represent the logical or ink extents of a single glyph or section
of text. (See, for instance, <link linkend="pango-font-get-glyph-extents"><function>pango_font_get_glyph_extents()</function></link>)</para>
<refsect3 id="PangoRectangle.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><link linkend="int"><type>int</type></link>&#160;<structfield id="PangoRectangle.x">x</structfield>;</para></entry>
<entry role="struct_member_description"><para>X coordinate of the left side of the rectangle.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="int"><type>int</type></link>&#160;<structfield id="PangoRectangle.y">y</structfield>;</para></entry>
<entry role="struct_member_description"><para>Y coordinate of the the top side of the rectangle.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="int"><type>int</type></link>&#160;<structfield id="PangoRectangle.width">width</structfield>;</para></entry>
<entry role="struct_member_description"><para>width of the rectangle.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="int"><type>int</type></link>&#160;<structfield id="PangoRectangle.height">height</structfield>;</para></entry>
<entry role="struct_member_description"><para>height of the rectangle.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>
<refsect2 id="PangoMatrix-struct" role="struct">
<title>struct PangoMatrix</title>
<indexterm zone="PangoMatrix-struct" role="1.6"><primary>PangoMatrix</primary></indexterm>
<programlisting language="C">struct PangoMatrix {
  double xx;
  double xy;
  double yx;
  double yy;
  double x0;
  double y0;
};
</programlisting>
<para>A structure specifying a transformation between user-space
coordinates and device coordinates. The transformation
is given by</para>
<programlisting>
x_device = x_user * matrix->xx + y_user * matrix->xy + matrix->x0;
y_device = x_user * matrix->yx + y_user * matrix->yy + matrix->y0;
</programlisting>
<refsect3 id="PangoMatrix.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><link linkend="double"><type>double</type></link>&#160;<structfield id="PangoMatrix-struct.xx">xx</structfield>;</para></entry>
<entry role="struct_member_description"><para>1st component of the transformation matrix</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="double"><type>double</type></link>&#160;<structfield id="PangoMatrix-struct.xy">xy</structfield>;</para></entry>
<entry role="struct_member_description"><para>2nd component of the transformation matrix</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="double"><type>double</type></link>&#160;<structfield id="PangoMatrix-struct.yx">yx</structfield>;</para></entry>
<entry role="struct_member_description"><para>3rd component of the transformation matrix</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="double"><type>double</type></link>&#160;<structfield id="PangoMatrix-struct.yy">yy</structfield>;</para></entry>
<entry role="struct_member_description"><para>4th component of the transformation matrix</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="double"><type>double</type></link>&#160;<structfield id="PangoMatrix-struct.x0">x0</structfield>;</para></entry>
<entry role="struct_member_description"><para>x translation</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="double"><type>double</type></link>&#160;<structfield id="PangoMatrix-struct.y0">y0</structfield>;</para></entry>
<entry role="struct_member_description"><para>y translation</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
<para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="PANGO-TYPE-MATRIX:CAPS" role="macro">
<title>PANGO_TYPE_MATRIX</title>
<indexterm zone="PANGO-TYPE-MATRIX:CAPS"><primary>PANGO_TYPE_MATRIX</primary></indexterm>
<programlisting language="C">#define PANGO_TYPE_MATRIX (pango_matrix_get_type ())
</programlisting>
<para>The GObject type for <link linkend="PangoMatrix"><type>PangoMatrix</type></link></para>
</refsect2>
<refsect2 id="PANGO-MATRIX-INIT:CAPS" role="macro" condition="since:1.6">
<title>PANGO_MATRIX_INIT</title>
<indexterm zone="PANGO-MATRIX-INIT:CAPS" role="1.6"><primary>PANGO_MATRIX_INIT</primary></indexterm>
<programlisting language="C">#define PANGO_MATRIX_INIT { 1., 0., 0., 1., 0., 0. }
</programlisting>
<para>Constant that can be used to initialize a PangoMatrix to
the identity transform.</para>
<informalexample><programlisting>
PangoMatrix matrix = PANGO_MATRIX_INIT;
pango_matrix_rotate (&amp;matrix, 45.);
</programlisting></informalexample>
<para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="PangoGlyph" role="typedef">
<title>PangoGlyph</title>
<indexterm zone="PangoGlyph"><primary>PangoGlyph</primary></indexterm>
<programlisting language="C">typedef guint32 PangoGlyph;
</programlisting>
<para>A <link linkend="PangoGlyph"><type>PangoGlyph</type></link> represents a single glyph in the output form of a string.</para>
</refsect2>
<refsect2 id="PANGO-GLYPH-EMPTY:CAPS" role="macro">
<title>PANGO_GLYPH_EMPTY</title>
<indexterm zone="PANGO-GLYPH-EMPTY:CAPS"><primary>PANGO_GLYPH_EMPTY</primary></indexterm>
<programlisting language="C">#define PANGO_GLYPH_EMPTY           ((PangoGlyph)0x0FFFFFFF)
</programlisting>
<para>The <link linkend="PANGO-GLYPH-EMPTY:CAPS"><literal>PANGO_GLYPH_EMPTY</literal></link> macro represents a <link linkend="PangoGlyph"><type>PangoGlyph</type></link> value that has a
 special meaning, which is a zero-width empty glyph.  This is useful for
example in shaper modules, to use as the glyph for various zero-width
Unicode characters (those passing <link linkend="pango-is-zero-width"><function>pango_is_zero_width()</function></link>).</para>
</refsect2>
<refsect2 id="PANGO-GLYPH-INVALID-INPUT:CAPS" role="macro" condition="since:1.20">
<title>PANGO_GLYPH_INVALID_INPUT</title>
<indexterm zone="PANGO-GLYPH-INVALID-INPUT:CAPS" role="1.20"><primary>PANGO_GLYPH_INVALID_INPUT</primary></indexterm>
<programlisting language="C">#define PANGO_GLYPH_INVALID_INPUT   ((PangoGlyph)0xFFFFFFFF)
</programlisting>
<para>The <link linkend="PANGO-GLYPH-INVALID-INPUT:CAPS"><literal>PANGO_GLYPH_INVALID_INPUT</literal></link> macro represents a <link linkend="PangoGlyph"><type>PangoGlyph</type></link> value that has a
special meaning of invalid input.  <link linkend="PangoLayout"><type>PangoLayout</type></link> produces one such glyph
per invalid input UTF-8 byte and such a glyph is rendered as a crossed
box.</para>
<para>Note that this value is defined such that it has the <link linkend="PANGO-GLYPH-UNKNOWN-FLAG:CAPS"><literal>PANGO_GLYPH_UNKNOWN_FLAG</literal></link>
on.</para>
<para role="since">Since: <link linkend="api-index-1.20">1.20</link></para></refsect2>
<refsect2 id="PANGO-GLYPH-UNKNOWN-FLAG:CAPS" role="macro">
<title>PANGO_GLYPH_UNKNOWN_FLAG</title>
<indexterm zone="PANGO-GLYPH-UNKNOWN-FLAG:CAPS"><primary>PANGO_GLYPH_UNKNOWN_FLAG</primary></indexterm>
<programlisting language="C">#define PANGO_GLYPH_UNKNOWN_FLAG    ((PangoGlyph)0x10000000)
</programlisting>
<para>The <link linkend="PANGO-GLYPH-UNKNOWN-FLAG:CAPS"><literal>PANGO_GLYPH_UNKNOWN_FLAG</literal></link> macro is a flag value that can be added to
a <link linkend="gunichar"><type>gunichar</type></link> value of a valid Unicode character, to produce a <link linkend="PangoGlyph"><type>PangoGlyph</type></link>
value, representing an unknown-character glyph for the respective <link linkend="gunichar"><type>gunichar</type></link>.</para>
</refsect2>
<refsect2 id="PangoGlyphInfo" role="struct">
<title>struct PangoGlyphInfo</title>
<indexterm zone="PangoGlyphInfo"><primary>PangoGlyphInfo</primary></indexterm>
<programlisting language="C">struct PangoGlyphInfo {
  PangoGlyph    glyph;
  PangoGlyphGeometry geometry;
  PangoGlyphVisAttr  attr;
};
</programlisting>
<para>The <link linkend="PangoGlyphInfo"><type>PangoGlyphInfo</type></link> structure represents a single glyph together with
positioning information and visual attributes.
It contains the following fields.</para>
<refsect3 id="PangoGlyphInfo.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><link linkend="PangoGlyph"><type>PangoGlyph</type></link>&#160;<structfield id="PangoGlyphInfo.glyph">glyph</structfield>;</para></entry>
<entry role="struct_member_description"><para>the glyph itself.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="PangoGlyphGeometry"><type>PangoGlyphGeometry</type></link>&#160;<structfield id="PangoGlyphInfo.geometry">geometry</structfield>;</para></entry>
<entry role="struct_member_description"><para>the positional information about the glyph.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="PangoGlyphVisAttr"><type>PangoGlyphVisAttr</type></link>&#160;<structfield id="PangoGlyphInfo.attr">attr</structfield>;</para></entry>
<entry role="struct_member_description"><para>the visual attributes of the glyph.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>
<refsect2 id="PangoGlyphGeometry" role="struct">
<title>struct PangoGlyphGeometry</title>
<indexterm zone="PangoGlyphGeometry"><primary>PangoGlyphGeometry</primary></indexterm>
<programlisting language="C">struct PangoGlyphGeometry {
  PangoGlyphUnit width;
  PangoGlyphUnit x_offset;
  PangoGlyphUnit y_offset;
};
</programlisting>
<para>The <link linkend="PangoGlyphGeometry"><type>PangoGlyphGeometry</type></link> structure contains width and positioning
information for a single glyph.</para>
<refsect3 id="PangoGlyphGeometry.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><link linkend="PangoGlyphUnit"><type>PangoGlyphUnit</type></link>&#160;<structfield id="PangoGlyphGeometry.width">width</structfield>;</para></entry>
<entry role="struct_member_description"><para>the logical width to use for the the character.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="PangoGlyphUnit"><type>PangoGlyphUnit</type></link>&#160;<structfield id="PangoGlyphGeometry.x-offset">x_offset</structfield>;</para></entry>
<entry role="struct_member_description"><para>horizontal offset from nominal character position.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="PangoGlyphUnit"><type>PangoGlyphUnit</type></link>&#160;<structfield id="PangoGlyphGeometry.y-offset">y_offset</structfield>;</para></entry>
<entry role="struct_member_description"><para>vertical offset from nominal character position.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>
<refsect2 id="PangoGlyphUnit" role="typedef">
<title>PangoGlyphUnit</title>
<indexterm zone="PangoGlyphUnit"><primary>PangoGlyphUnit</primary></indexterm>
<programlisting language="C">typedef gint32 PangoGlyphUnit;
</programlisting>
<para>The <link linkend="PangoGlyphUnit"><type>PangoGlyphUnit</type></link> type is used to store dimensions within
Pango. Dimensions are stored in 1/<link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> of a device unit.
(A device unit might be a pixel for screen display, or
a point on a printer.) <link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> is currently 1024, and
may change in the future (unlikely though), but you should not
depend on its exact value. The <link linkend="PANGO-PIXELS:CAPS"><function>PANGO_PIXELS()</function></link> macro can be used
to convert from glyph units into device units with correct rounding.</para>
</refsect2>
<refsect2 id="PangoGlyphVisAttr" role="struct">
<title>struct PangoGlyphVisAttr</title>
<indexterm zone="PangoGlyphVisAttr"><primary>PangoGlyphVisAttr</primary></indexterm>
<programlisting language="C">struct PangoGlyphVisAttr {
  guint is_cluster_start : 1;
};
</programlisting>
<para>The PangoGlyphVisAttr is used to communicate information between
the shaping phase and the rendering phase.  More attributes may be
added in the future.</para>
<refsect3 id="PangoGlyphVisAttr.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><link linkend="guint"><type>guint</type></link>&#160;<structfield id="PangoGlyphVisAttr.is-cluster-start">is_cluster_start</structfield>&#160;:&#160;1;</para></entry>
<entry role="struct_member_description"><para>set for the first logical glyph in each cluster. (Clusters
are stored in visual order, within the cluster, glyphs
are always ordered in logical order, since visual
order is meaningless; that is, in Arabic text, accent glyphs
follow the glyphs for the base character.)</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>
<refsect2 id="PangoGlyphString-struct" role="struct">
<title>struct PangoGlyphString</title>
<indexterm zone="PangoGlyphString-struct"><primary>PangoGlyphString</primary></indexterm>
<programlisting language="C">struct PangoGlyphString {
  gint num_glyphs;

  PangoGlyphInfo *glyphs;
  gint *log_clusters;
};
</programlisting>
<para>The <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> structure is used to store strings
of glyphs with geometry and visual attribute information.
The storage for the glyph information is owned
by the structure which simplifies memory management.</para>
<refsect3 id="PangoGlyphString.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><link linkend="gint"><type>gint</type></link>&#160;<structfield id="PangoGlyphString-struct.num-glyphs">num_glyphs</structfield>;</para></entry>
<entry role="struct_member_description"><para>number of the glyphs in this glyph string.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="PangoGlyphInfo"><type>PangoGlyphInfo</type></link>&#160;*<structfield id="PangoGlyphString-struct.glyphs">glyphs</structfield>;</para></entry>
<entry role="struct_member_description"><para>array of glyph information
for the glyph string. </para></entry>
<entry role="struct_member_annotations"><emphasis role="annotation">[<acronym>array</acronym> length=num_glyphs]</emphasis></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="gint"><type>gint</type></link>&#160;*<structfield id="PangoGlyphString-struct.log-clusters">log_clusters</structfield>;</para></entry>
<entry role="struct_member_description"><para>logical cluster info, indexed by the byte index
within the text corresponding to the glyph string.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>
<refsect2 id="PangoGlyphItem-struct" role="struct">
<title>struct PangoGlyphItem</title>
<indexterm zone="PangoGlyphItem-struct"><primary>PangoGlyphItem</primary></indexterm>
<programlisting language="C">struct PangoGlyphItem {
  PangoItem        *item;
  PangoGlyphString *glyphs;
};
</programlisting>
<para>A <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link> is a pair of a <link linkend="PangoItem"><type>PangoItem</type></link> and the glyphs
resulting from shaping the text corresponding to an item.
As an example of the usage of <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link>, the results
of shaping text with <link linkend="PangoLayout"><type>PangoLayout</type></link> is a list of <link linkend="PangoLayoutLine"><type>PangoLayoutLine</type></link>,
each of which contains a list of <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link>.</para>
<refsect3 id="PangoGlyphItem.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><link linkend="PangoItem"><type>PangoItem</type></link>&#160;*<structfield id="PangoGlyphItem-struct.item">item</structfield>;</para></entry>
<entry role="struct_member_description"><para>corresponding <link linkend="PangoItem"><type>PangoItem</type></link>.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>&#160;*<structfield id="PangoGlyphItem-struct.glyphs">glyphs</structfield>;</para></entry>
<entry role="struct_member_description"><para>corresponding <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
</refsect2>
<refsect2 id="PangoGlyphItemIter-struct" role="struct">
<title>struct PangoGlyphItemIter</title>
<indexterm zone="PangoGlyphItemIter-struct" role="1.22"><primary>PangoGlyphItemIter</primary></indexterm>
<programlisting language="C">struct PangoGlyphItemIter {
  PangoGlyphItem *glyph_item;
  const gchar *text;

  int start_glyph;
  int start_index;
  int start_char;

  int end_glyph;
  int end_index;
  int end_char;
};
</programlisting>
<para>A <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> is an iterator over the clusters in a
<link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link>.  The <firstterm>forward direction</firstterm> of the
iterator is the logical direction of text.  That is, with increasing
<parameter>start_index</parameter>
 and <parameter>start_char</parameter>
 values.  If <parameter>glyph_item</parameter>
 is right-to-left
(that is, if <literal><parameter>glyph_item->item->analysis.level</parameter>
</literal> is odd),
then <parameter>start_glyph</parameter>
 decreases as the iterator moves forward.  Moreover,
in right-to-left cases, <parameter>start_glyph</parameter>
 is greater than <parameter>end_glyph</parameter>
.</para>
<para>An iterator should be initialized using either of
<link linkend="pango-glyph-item-iter-init-start"><function>pango_glyph_item_iter_init_start()</function></link> and
<link linkend="pango-glyph-item-iter-init-end"><function>pango_glyph_item_iter_init_end()</function></link>, for forward and backward iteration
respectively, and walked over using any desired mixture of
<link linkend="pango-glyph-item-iter-next-cluster"><function>pango_glyph_item_iter_next_cluster()</function></link> and
<link linkend="pango-glyph-item-iter-prev-cluster"><function>pango_glyph_item_iter_prev_cluster()</function></link>.  A common idiom for doing a
forward iteration over the clusters is:</para>
<programlisting>
PangoGlyphItemIter cluster_iter;
gboolean have_cluster;

for (have_cluster = pango_glyph_item_iter_init_start (&amp;cluster_iter,
                                                      glyph_item, text);
     have_cluster;
     have_cluster = pango_glyph_item_iter_next_cluster (&amp;cluster_iter))
{
  ...
}
</programlisting>
<para>Note that <parameter>text</parameter>
 is the start of the text for layout, which is then
indexed by <literal><parameter>glyph_item->item->offset</parameter>
</literal> to get to the
text of <parameter>glyph_item</parameter>
.  The <parameter>start_index</parameter>
 and <parameter>end_index</parameter>
 values can directly
index into <parameter>text</parameter>
.  The <parameter>start_glyph</parameter>
, <parameter>end_glyph</parameter>
, <parameter>start_char</parameter>
, and <parameter>end_char</parameter>

values however are zero-based for the <parameter>glyph_item</parameter>
.  For each cluster, the
item pointed at by the start variables is included in the cluster while
the one pointed at by end variables is not.</para>
<para>None of the members of a <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link> should be modified manually.</para>
<para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>
<refsect2 id="PANGO-TYPE-GLYPH-STRING:CAPS" role="macro">
<title>PANGO_TYPE_GLYPH_STRING</title>
<indexterm zone="PANGO-TYPE-GLYPH-STRING:CAPS"><primary>PANGO_TYPE_GLYPH_STRING</primary></indexterm>
<programlisting language="C">#define PANGO_TYPE_GLYPH_STRING (pango_glyph_string_get_type ())
</programlisting>
<para>The <link linkend="GObject"><type>GObject</type></link> type for <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>.</para>
</refsect2>
<refsect2 id="PANGO-TYPE-GLYPH-ITEM:CAPS" role="macro">
<title>PANGO_TYPE_GLYPH_ITEM</title>
<indexterm zone="PANGO-TYPE-GLYPH-ITEM:CAPS"><primary>PANGO_TYPE_GLYPH_ITEM</primary></indexterm>
<programlisting language="C">#define PANGO_TYPE_GLYPH_ITEM (pango_glyph_item_get_type ())
</programlisting>
<para>The <link linkend="GObject"><type>GObject</type></link> type for <link linkend="PangoGlyphItem"><type>PangoGlyphItem</type></link>.</para>
</refsect2>
<refsect2 id="PANGO-TYPE-GLYPH-ITEM-ITER:CAPS" role="macro" condition="since:1.22">
<title>PANGO_TYPE_GLYPH_ITEM_ITER</title>
<indexterm zone="PANGO-TYPE-GLYPH-ITEM-ITER:CAPS" role="1.22"><primary>PANGO_TYPE_GLYPH_ITEM_ITER</primary></indexterm>
<programlisting language="C">#define PANGO_TYPE_GLYPH_ITEM_ITER (pango_glyph_item_iter_get_type ())
</programlisting>
<para>The <link linkend="GObject"><type>GObject</type></link> type for <link linkend="PangoGlyphItemIter"><type>PangoGlyphItemIter</type></link>.</para>
<para role="since">Since: <link linkend="api-index-1.22">1.22</link></para></refsect2>

</refsect1>

</refentry>
