<refentry id="pango-Text-Attributes">
<refmeta>
<refentrytitle role="top_of_page">Text Attributes</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>PANGO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Text Attributes</refname>
<refpurpose>Font and other attributes for annotating text</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>

<refsynopsisdiv role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>



enum                <link linkend="PangoAttrType">PangoAttrType</link>;
#define             <link linkend="PANGO-TYPE-ATTR-TYPE:CAPS">PANGO_TYPE_ATTR_TYPE</link>
                    <link linkend="PangoAttrClass">PangoAttrClass</link>;
                    <link linkend="PangoAttribute">PangoAttribute</link>;
                    <link linkend="PangoAttrString">PangoAttrString</link>;
                    <link linkend="PangoAttrLanguage">PangoAttrLanguage</link>;
                    <link linkend="PangoAttrColor">PangoAttrColor</link>;
                    <link linkend="PangoAttrInt">PangoAttrInt</link>;
                    <link linkend="PangoAttrFloat">PangoAttrFloat</link>;
                    <link linkend="PangoAttrFontDesc">PangoAttrFontDesc</link>;
                    <link linkend="PangoAttrShape">PangoAttrShape</link>;
                    <link linkend="PangoAttrSize">PangoAttrSize</link>;
<link linkend="gboolean">gboolean</link>            <link linkend="pango-parse-markup">pango_parse_markup</link>                  (const <link linkend="char">char</link> *markup_text,
                                                         <link linkend="int">int</link> length,
                                                         <link linkend="gunichar">gunichar</link> accel_marker,
                                                         <link linkend="PangoAttrList">PangoAttrList</link> **attr_list,
                                                         <link linkend="char">char</link> **text,
                                                         <link linkend="gunichar">gunichar</link> *accel_char,
                                                         <link linkend="GError">GError</link> **error);
<link linkend="PangoAttrType">PangoAttrType</link>       <link linkend="pango-attr-type-register">pango_attr_type_register</link>            (const <link linkend="gchar">gchar</link> *name);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attribute-copy">pango_attribute_copy</link>                (const <link linkend="PangoAttribute">PangoAttribute</link> *attr);
<link linkend="gboolean">gboolean</link>            <link linkend="pango-attribute-equal">pango_attribute_equal</link>               (const <link linkend="PangoAttribute">PangoAttribute</link> *attr1,
                                                         const <link linkend="PangoAttribute">PangoAttribute</link> *attr2);
<link linkend="void">void</link>                <link linkend="pango-attribute-destroy">pango_attribute_destroy</link>             (<link linkend="PangoAttribute">PangoAttribute</link> *attr);

<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-language-new">pango_attr_language_new</link>             (<link linkend="PangoLanguage">PangoLanguage</link> *language);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-family-new">pango_attr_family_new</link>               (const <link linkend="char">char</link> *family);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-style-new">pango_attr_style_new</link>                (<link linkend="PangoStyle">PangoStyle</link> style);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-variant-new">pango_attr_variant_new</link>              (<link linkend="PangoVariant">PangoVariant</link> variant);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-stretch-new">pango_attr_stretch_new</link>              (<link linkend="PangoStretch">PangoStretch</link> stretch);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-weight-new">pango_attr_weight_new</link>               (<link linkend="PangoWeight">PangoWeight</link> weight);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-size-new">pango_attr_size_new</link>                 (<link linkend="int">int</link> size);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-size-new-absolute">pango_attr_size_new_absolute</link>        (<link linkend="int">int</link> size);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-font-desc-new">pango_attr_font_desc_new</link>            (const <link linkend="PangoFontDescription">PangoFontDescription</link> *desc);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-foreground-new">pango_attr_foreground_new</link>           (<link linkend="guint16">guint16</link> red,
                                                         <link linkend="guint16">guint16</link> green,
                                                         <link linkend="guint16">guint16</link> blue);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-background-new">pango_attr_background_new</link>           (<link linkend="guint16">guint16</link> red,
                                                         <link linkend="guint16">guint16</link> green,
                                                         <link linkend="guint16">guint16</link> blue);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-strikethrough-new">pango_attr_strikethrough_new</link>        (<link linkend="gboolean">gboolean</link> strikethrough);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-strikethrough-color-new">pango_attr_strikethrough_color_new</link>  (<link linkend="guint16">guint16</link> red,
                                                         <link linkend="guint16">guint16</link> green,
                                                         <link linkend="guint16">guint16</link> blue);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-underline-new">pango_attr_underline_new</link>            (<link linkend="PangoUnderline">PangoUnderline</link> underline);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-underline-color-new">pango_attr_underline_color_new</link>      (<link linkend="guint16">guint16</link> red,
                                                         <link linkend="guint16">guint16</link> green,
                                                         <link linkend="guint16">guint16</link> blue);
enum                <link linkend="PangoUnderline">PangoUnderline</link>;
#define             <link linkend="PANGO-TYPE-UNDERLINE:CAPS">PANGO_TYPE_UNDERLINE</link>
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-shape-new">pango_attr_shape_new</link>                (const <link linkend="PangoRectangle">PangoRectangle</link> *ink_rect,
                                                         const <link linkend="PangoRectangle">PangoRectangle</link> *logical_rect);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-shape-new-with-data">pango_attr_shape_new_with_data</link>      (const <link linkend="PangoRectangle">PangoRectangle</link> *ink_rect,
                                                         const <link linkend="PangoRectangle">PangoRectangle</link> *logical_rect,
                                                         <link linkend="gpointer">gpointer</link> data,
                                                         <link linkend="PangoAttrDataCopyFunc">PangoAttrDataCopyFunc</link> copy_func,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> destroy_func);
<link linkend="gpointer">gpointer</link>            (<link linkend="PangoAttrDataCopyFunc">*PangoAttrDataCopyFunc</link>)            (<link linkend="gconstpointer">gconstpointer</link> data);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-scale-new">pango_attr_scale_new</link>                (<link linkend="double">double</link> scale_factor);
#define             <link linkend="PANGO-SCALE-XX-SMALL:CAPS">PANGO_SCALE_XX_SMALL</link>
#define             <link linkend="PANGO-SCALE-X-SMALL:CAPS">PANGO_SCALE_X_SMALL</link>
#define             <link linkend="PANGO-SCALE-SMALL:CAPS">PANGO_SCALE_SMALL</link>
#define             <link linkend="PANGO-SCALE-MEDIUM:CAPS">PANGO_SCALE_MEDIUM</link>
#define             <link linkend="PANGO-SCALE-LARGE:CAPS">PANGO_SCALE_LARGE</link>
#define             <link linkend="PANGO-SCALE-X-LARGE:CAPS">PANGO_SCALE_X_LARGE</link>
#define             <link linkend="PANGO-SCALE-XX-LARGE:CAPS">PANGO_SCALE_XX_LARGE</link>
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-rise-new">pango_attr_rise_new</link>                 (<link linkend="int">int</link> rise);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-letter-spacing-new">pango_attr_letter_spacing_new</link>       (<link linkend="int">int</link> letter_spacing);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-fallback-new">pango_attr_fallback_new</link>             (<link linkend="gboolean">gboolean</link> enable_fallback);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-gravity-new">pango_attr_gravity_new</link>              (<link linkend="PangoGravity">PangoGravity</link> gravity);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-gravity-hint-new">pango_attr_gravity_hint_new</link>         (<link linkend="PangoGravityHint">PangoGravityHint</link> hint);
                    <link linkend="PangoColor">PangoColor</link>;
#define             <link linkend="PANGO-TYPE-COLOR:CAPS">PANGO_TYPE_COLOR</link>
<link linkend="gboolean">gboolean</link>            <link linkend="pango-color-parse">pango_color_parse</link>                   (<link linkend="PangoColor">PangoColor</link> *color,
                                                         const <link linkend="char">char</link> *spec);
<link linkend="PangoColor">PangoColor</link>*         <link linkend="pango-color-copy">pango_color_copy</link>                    (const <link linkend="PangoColor">PangoColor</link> *src);
<link linkend="void">void</link>                <link linkend="pango-color-free">pango_color_free</link>                    (<link linkend="PangoColor">PangoColor</link> *color);
<link linkend="gchar">gchar</link>*              <link linkend="pango-color-to-string">pango_color_to_string</link>               (const <link linkend="PangoColor">PangoColor</link> *color);
                    <link linkend="PangoLanguage">PangoLanguage</link>;
#define             <link linkend="PANGO-TYPE-LANGUAGE:CAPS">PANGO_TYPE_LANGUAGE</link>
<link linkend="PangoLanguage">PangoLanguage</link>*      <link linkend="pango-language-from-string">pango_language_from_string</link>          (const <link linkend="char">char</link> *language);
#define             <link linkend="pango-language-to-string">pango_language_to_string</link>            (language)
<link linkend="gboolean">gboolean</link>            <link linkend="pango-language-matches">pango_language_matches</link>              (<link linkend="PangoLanguage">PangoLanguage</link> *language,
                                                         const <link linkend="char">char</link> *range_list);

                    <link linkend="PangoAttrList">PangoAttrList</link>;
#define             <link linkend="PANGO-TYPE-ATTR-LIST:CAPS">PANGO_TYPE_ATTR_LIST</link>
<link linkend="PangoAttrList">PangoAttrList</link>*      <link linkend="pango-attr-list-new">pango_attr_list_new</link>                 (void);
<link linkend="PangoAttrList">PangoAttrList</link>*      <link linkend="pango-attr-list-ref">pango_attr_list_ref</link>                 (<link linkend="PangoAttrList">PangoAttrList</link> *list);
<link linkend="void">void</link>                <link linkend="pango-attr-list-unref">pango_attr_list_unref</link>               (<link linkend="PangoAttrList">PangoAttrList</link> *list);
<link linkend="PangoAttrList">PangoAttrList</link>*      <link linkend="pango-attr-list-copy">pango_attr_list_copy</link>                (<link linkend="PangoAttrList">PangoAttrList</link> *list);
<link linkend="void">void</link>                <link linkend="pango-attr-list-insert">pango_attr_list_insert</link>              (<link linkend="PangoAttrList">PangoAttrList</link> *list,
                                                         <link linkend="PangoAttribute">PangoAttribute</link> *attr);
<link linkend="void">void</link>                <link linkend="pango-attr-list-insert-before">pango_attr_list_insert_before</link>       (<link linkend="PangoAttrList">PangoAttrList</link> *list,
                                                         <link linkend="PangoAttribute">PangoAttribute</link> *attr);
<link linkend="void">void</link>                <link linkend="pango-attr-list-change">pango_attr_list_change</link>              (<link linkend="PangoAttrList">PangoAttrList</link> *list,
                                                         <link linkend="PangoAttribute">PangoAttribute</link> *attr);
<link linkend="void">void</link>                <link linkend="pango-attr-list-splice">pango_attr_list_splice</link>              (<link linkend="PangoAttrList">PangoAttrList</link> *list,
                                                         <link linkend="PangoAttrList">PangoAttrList</link> *other,
                                                         <link linkend="gint">gint</link> pos,
                                                         <link linkend="gint">gint</link> len);
<link linkend="PangoAttrList">PangoAttrList</link>*      <link linkend="pango-attr-list-filter">pango_attr_list_filter</link>              (<link linkend="PangoAttrList">PangoAttrList</link> *list,
                                                         <link linkend="PangoAttrFilterFunc">PangoAttrFilterFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> data);
<link linkend="gboolean">gboolean</link>            (<link linkend="PangoAttrFilterFunc">*PangoAttrFilterFunc</link>)              (<link linkend="PangoAttribute">PangoAttribute</link> *attribute,
                                                         <link linkend="gpointer">gpointer</link> data);
<link linkend="PangoAttrIterator">PangoAttrIterator</link>*  <link linkend="pango-attr-list-get-iterator">pango_attr_list_get_iterator</link>        (<link linkend="PangoAttrList">PangoAttrList</link> *list);
                    <link linkend="PangoAttrIterator">PangoAttrIterator</link>;
<link linkend="PangoAttrIterator">PangoAttrIterator</link>*  <link linkend="pango-attr-iterator-copy">pango_attr_iterator_copy</link>            (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator);
<link linkend="gboolean">gboolean</link>            <link linkend="pango-attr-iterator-next">pango_attr_iterator_next</link>            (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator);
<link linkend="void">void</link>                <link linkend="pango-attr-iterator-range">pango_attr_iterator_range</link>           (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator,
                                                         <link linkend="gint">gint</link> *start,
                                                         <link linkend="gint">gint</link> *end);
<link linkend="PangoAttribute">PangoAttribute</link>*     <link linkend="pango-attr-iterator-get">pango_attr_iterator_get</link>             (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator,
                                                         <link linkend="PangoAttrType">PangoAttrType</link> type);
<link linkend="void">void</link>                <link linkend="pango-attr-iterator-get-font">pango_attr_iterator_get_font</link>        (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator,
                                                         <link linkend="PangoFontDescription">PangoFontDescription</link> *desc,
                                                         <link linkend="PangoLanguage">PangoLanguage</link> **language,
                                                         <link linkend="GSList">GSList</link> **extra_attrs);
<link linkend="GSList">GSList</link>*             <link linkend="pango-attr-iterator-get-attrs">pango_attr_iterator_get_attrs</link>       (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator);
<link linkend="void">void</link>                <link linkend="pango-attr-iterator-destroy">pango_attr_iterator_destroy</link>         (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator);

</synopsis>
</refsynopsisdiv>









<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>
Attributed text is used in a number of places in Pango. It
is used as the input to the itemization process and also when
creating a <link linkend="PangoLayout"><type>PangoLayout</type></link>. The data types and functions in
this section are used to represent and manipulate sets
of attributes applied to a portion of text.
</para>
</refsect1>

<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="PangoAttrType" role="enum"/>enum PangoAttrType</title>
<indexterm><primary>PangoAttrType</primary></indexterm><programlisting>typedef enum
{
  PANGO_ATTR_INVALID,           /* 0 is an invalid attribute type */
  PANGO_ATTR_LANGUAGE,		/* PangoAttrLanguage */
  PANGO_ATTR_FAMILY,		/* PangoAttrString */
  PANGO_ATTR_STYLE,		/* PangoAttrInt */
  PANGO_ATTR_WEIGHT,		/* PangoAttrInt */
  PANGO_ATTR_VARIANT,		/* PangoAttrInt */
  PANGO_ATTR_STRETCH,		/* PangoAttrInt */
  PANGO_ATTR_SIZE,		/* PangoAttrSize */
  PANGO_ATTR_FONT_DESC,		/* PangoAttrFontDesc */
  PANGO_ATTR_FOREGROUND,	/* PangoAttrColor */
  PANGO_ATTR_BACKGROUND,	/* PangoAttrColor */
  PANGO_ATTR_UNDERLINE,		/* PangoAttrInt */
  PANGO_ATTR_STRIKETHROUGH,	/* PangoAttrInt */
  PANGO_ATTR_RISE,		/* PangoAttrInt */
  PANGO_ATTR_SHAPE,		/* PangoAttrShape */
  PANGO_ATTR_SCALE,             /* PangoAttrFloat */
  PANGO_ATTR_FALLBACK,          /* PangoAttrInt */
  PANGO_ATTR_LETTER_SPACING,    /* PangoAttrInt */
  PANGO_ATTR_UNDERLINE_COLOR,	/* PangoAttrColor */
  PANGO_ATTR_STRIKETHROUGH_COLOR,/* PangoAttrColor */
  PANGO_ATTR_ABSOLUTE_SIZE,	/* PangoAttrSize */
  PANGO_ATTR_GRAVITY,		/* PangoAttrInt */
  PANGO_ATTR_GRAVITY_HINT	/* PangoAttrInt */
} PangoAttrType;
</programlisting>
<para>
The <link linkend="PangoAttrType"><type>PangoAttrType</type></link>
distinguishes between different types of attributes. Along with the
predefined values, it is possible to allocate additional values
for custom attributes using <link linkend="pango-attr-type-register"><function>pango_attr_type_register()</function></link>. The predefined
values are given below. The type of structure used to store the
attribute is listed in parentheses after the description.
</para><variablelist role="enum">
<varlistentry>
<term><anchor id="PANGO-ATTR-INVALID:CAPS" role="constant"/><literal>PANGO_ATTR_INVALID</literal></term>
<listitem><simpara>does not happen
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-LANGUAGE:CAPS" role="constant"/><literal>PANGO_ATTR_LANGUAGE</literal></term>
<listitem><simpara>language (<link linkend="PangoAttrLanguage"><type>PangoAttrLanguage</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-FAMILY:CAPS" role="constant"/><literal>PANGO_ATTR_FAMILY</literal></term>
<listitem><simpara>font family name list (<link linkend="PangoAttrString"><type>PangoAttrString</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-STYLE:CAPS" role="constant"/><literal>PANGO_ATTR_STYLE</literal></term>
<listitem><simpara>font slant style (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-WEIGHT:CAPS" role="constant"/><literal>PANGO_ATTR_WEIGHT</literal></term>
<listitem><simpara>font weight (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-VARIANT:CAPS" role="constant"/><literal>PANGO_ATTR_VARIANT</literal></term>
<listitem><simpara>font variant (normal or small caps) (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-STRETCH:CAPS" role="constant"/><literal>PANGO_ATTR_STRETCH</literal></term>
<listitem><simpara>font stretch (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-SIZE:CAPS" role="constant"/><literal>PANGO_ATTR_SIZE</literal></term>
<listitem><simpara>font size in points scaled by <link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-FONT-DESC:CAPS" role="constant"/><literal>PANGO_ATTR_FONT_DESC</literal></term>
<listitem><simpara>font description (<link linkend="PangoAttrFontDesc"><type>PangoAttrFontDesc</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-FOREGROUND:CAPS" role="constant"/><literal>PANGO_ATTR_FOREGROUND</literal></term>
<listitem><simpara>foreground color (<link linkend="PangoAttrColor"><type>PangoAttrColor</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-BACKGROUND:CAPS" role="constant"/><literal>PANGO_ATTR_BACKGROUND</literal></term>
<listitem><simpara>background color (<link linkend="PangoAttrColor"><type>PangoAttrColor</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-UNDERLINE:CAPS" role="constant"/><literal>PANGO_ATTR_UNDERLINE</literal></term>
<listitem><simpara>whether the text has an underline (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-STRIKETHROUGH:CAPS" role="constant"/><literal>PANGO_ATTR_STRIKETHROUGH</literal></term>
<listitem><simpara>whether the text is struck-through (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-RISE:CAPS" role="constant"/><literal>PANGO_ATTR_RISE</literal></term>
<listitem><simpara>baseline displacement (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-SHAPE:CAPS" role="constant"/><literal>PANGO_ATTR_SHAPE</literal></term>
<listitem><simpara>shape (<link linkend="PangoAttrShape"><type>PangoAttrShape</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-SCALE:CAPS" role="constant"/><literal>PANGO_ATTR_SCALE</literal></term>
<listitem><simpara>font size scale factor (<link linkend="PangoAttrFloat"><type>PangoAttrFloat</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-FALLBACK:CAPS" role="constant"/><literal>PANGO_ATTR_FALLBACK</literal></term>
<listitem><simpara>whether fallback is enabled (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-LETTER-SPACING:CAPS" role="constant"/><literal>PANGO_ATTR_LETTER_SPACING</literal></term>
<listitem><simpara>letter spacing (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-UNDERLINE-COLOR:CAPS" role="constant"/><literal>PANGO_ATTR_UNDERLINE_COLOR</literal></term>
<listitem><simpara>underline color (<link linkend="PangoAttrColor"><type>PangoAttrColor</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-STRIKETHROUGH-COLOR:CAPS" role="constant"/><literal>PANGO_ATTR_STRIKETHROUGH_COLOR</literal></term>
<listitem><simpara>strikethrough color (<link linkend="PangoAttrColor"><type>PangoAttrColor</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-ABSOLUTE-SIZE:CAPS" role="constant"/><literal>PANGO_ATTR_ABSOLUTE_SIZE</literal></term>
<listitem><simpara>font size in pixels scaled by <link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-GRAVITY:CAPS" role="constant"/><literal>PANGO_ATTR_GRAVITY</literal></term>
<listitem><simpara>base text gravity (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-ATTR-GRAVITY-HINT:CAPS" role="constant"/><literal>PANGO_ATTR_GRAVITY_HINT</literal></term>
<listitem><simpara>gravity hint (<link linkend="PangoAttrInt"><type>PangoAttrInt</type></link>)

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PANGO-TYPE-ATTR-TYPE:CAPS" role="macro"/>PANGO_TYPE_ATTR_TYPE</title>
<indexterm><primary>PANGO_TYPE_ATTR_TYPE</primary></indexterm><programlisting>#define PANGO_TYPE_ATTR_TYPE (pango_attr_type_get_type())
</programlisting>
<para>
The <link linkend="GObject"><type>GObject</type></link> type for <link linkend="PangoAttrType"><type>PangoAttrType</type></link>.
</para></refsect2>
<refsect2>
<title><anchor id="PangoAttrClass" role="struct"/>PangoAttrClass</title>
<indexterm><primary>PangoAttrClass</primary></indexterm><programlisting>typedef struct {
  PangoAttrType type;
  PangoAttribute * (*copy) (const PangoAttribute *attr);
  void             (*destroy) (PangoAttribute *attr);
  gboolean         (*equal) (const PangoAttribute *attr1, const PangoAttribute *attr2);
} PangoAttrClass;
</programlisting>
<para>
The <link linkend="PangoAttrClass"><type>PangoAttrClass</type></link> structure stores the type and operations for
a particular type of attribute. The functions in this structure should
not be called directly. Instead, one should use the wrapper functions
provided for <link linkend="PangoAttribute"><type>PangoAttribute</type></link>.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="PangoAttrType">PangoAttrType</link>&nbsp;<structfield>type</structfield>;</term>
<listitem><simpara>the type ID for this attribute
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>copy</structfield>&nbsp;()</term>
<listitem><simpara>function to duplicate an attribute of this type (see <link linkend="pango-attribute-copy"><function>pango_attribute_copy()</function></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>destroy</structfield>&nbsp;()</term>
<listitem><simpara>function to free an attribute of this type (see <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>equal</structfield>&nbsp;()</term>
<listitem><simpara>function to check two attributes of this type for equality (see <link linkend="pango-attribute-equal"><function>pango_attribute_equal()</function></link>)

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoAttribute" role="struct"/>PangoAttribute</title>
<indexterm><primary>PangoAttribute</primary></indexterm><programlisting>typedef struct {
  const PangoAttrClass *klass;
  guint start_index;	/* in bytes */
  guint end_index;	/* in bytes. The character at this index is not included */
} PangoAttribute;
</programlisting>
<para>
The <link linkend="PangoAttribute"><type>PangoAttribute</type></link> structure represents the common portions of all
attributes. Particular types of attributes include this structure
as their initial portion. The common portion of the attribute holds
the range to which the value in the type-specific part of the attribute
applies. 
</para><variablelist role="struct">
<varlistentry>
<term>const&nbsp;<link linkend="PangoAttrClass">PangoAttrClass</link>&nbsp;*<structfield>klass</structfield>;</term>
<listitem><simpara>the class structure holding information about the type of the attribute
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="guint">guint</link>&nbsp;<structfield>start_index</structfield>;</term>
<listitem><simpara>the start index of the range (in bytes).
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="guint">guint</link>&nbsp;<structfield>end_index</structfield>;</term>
<listitem><simpara>end index of the range (in bytes). The character at this index
	is not included in the range.

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoAttrString" role="struct"/>PangoAttrString</title>
<indexterm><primary>PangoAttrString</primary></indexterm><programlisting>typedef struct {
  PangoAttribute attr;
  char *value;
} PangoAttrString;
</programlisting>
<para>
The <link linkend="PangoAttrString"><type>PangoAttrString</type></link> structure is used to represent attributes with
a string value.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="PangoAttribute">PangoAttribute</link>&nbsp;<structfield>attr</structfield>;</term>
<listitem><simpara>the common portion of the attribute
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="char">char</link>&nbsp;*<structfield>value</structfield>;</term>
<listitem><simpara>the string which is the value of the attribute

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoAttrLanguage" role="struct"/>PangoAttrLanguage</title>
<indexterm><primary>PangoAttrLanguage</primary></indexterm><programlisting>typedef struct {
  PangoAttribute attr;
  PangoLanguage *value;
} PangoAttrLanguage;
</programlisting>
<para>
The <link linkend="PangoAttrLanguage"><type>PangoAttrLanguage</type></link> structure is used to represent attributes that
are languages.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="PangoAttribute">PangoAttribute</link>&nbsp;<structfield>attr</structfield>;</term>
<listitem><simpara>the common portion of the attribute
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="PangoLanguage">PangoLanguage</link>&nbsp;*<structfield>value</structfield>;</term>
<listitem><simpara>the <link linkend="PangoLanguage"><type>PangoLanguage</type></link> which is the value of the attribute

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoAttrColor" role="struct"/>PangoAttrColor</title>
<indexterm><primary>PangoAttrColor</primary></indexterm><programlisting>typedef struct {
  PangoAttribute attr;
  PangoColor color;
} PangoAttrColor;
</programlisting>
<para>
The <link linkend="PangoAttrColor"><type>PangoAttrColor</type></link> structure is used to represent attributes that
are colors.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="PangoAttribute">PangoAttribute</link>&nbsp;<structfield>attr</structfield>;</term>
<listitem><simpara>the common portion of the attribute
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="PangoColor">PangoColor</link>&nbsp;<structfield>color</structfield>;</term>
<listitem><simpara>the <link linkend="PangoColor"><type>PangoColor</type></link> which is the value of the attribute

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoAttrInt" role="struct"/>PangoAttrInt</title>
<indexterm><primary>PangoAttrInt</primary></indexterm><programlisting>typedef struct {
  PangoAttribute attr;
  int value;
} PangoAttrInt;
</programlisting>
<para>
The <link linkend="PangoAttrInt"><type>PangoAttrInt</type></link> structure is used to represent attributes with
an integer or enumeration value.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="PangoAttribute">PangoAttribute</link>&nbsp;<structfield>attr</structfield>;</term>
<listitem><simpara>the common portion of the attribute
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="int">int</link>&nbsp;<structfield>value</structfield>;</term>
<listitem><simpara>the value of the attribute

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoAttrFloat" role="struct"/>PangoAttrFloat</title>
<indexterm><primary>PangoAttrFloat</primary></indexterm><programlisting>typedef struct {
  PangoAttribute attr;
  double value;
} PangoAttrFloat;
</programlisting>
<para>
The <link linkend="PangoAttrFloat"><type>PangoAttrFloat</type></link> structure is used to represent attributes with
a float or double value.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="PangoAttribute">PangoAttribute</link>&nbsp;<structfield>attr</structfield>;</term>
<listitem><simpara>the common portion of the attribute
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="double">double</link>&nbsp;<structfield>value</structfield>;</term>
<listitem><simpara>the value of the attribute

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoAttrFontDesc" role="struct"/>PangoAttrFontDesc</title>
<indexterm><primary>PangoAttrFontDesc</primary></indexterm><programlisting>typedef struct {
  PangoAttribute attr;
  PangoFontDescription *desc;
} PangoAttrFontDesc;
</programlisting>
<para>
The <link linkend="PangoAttrFontDesc"><type>PangoAttrFontDesc</type></link> structure is used to store an attribute that
sets all aspects of the font description at once.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="PangoAttribute">PangoAttribute</link>&nbsp;<structfield>attr</structfield>;</term>
<listitem><simpara>the common portion of the attribute
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="PangoFontDescription">PangoFontDescription</link>&nbsp;*<structfield>desc</structfield>;</term>
<listitem><simpara>the font description which is the value of this attribute

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoAttrShape" role="struct"/>PangoAttrShape</title>
<indexterm><primary>PangoAttrShape</primary></indexterm><programlisting>typedef struct {
  PangoAttribute attr;
  PangoRectangle ink_rect;
  PangoRectangle logical_rect;

  gpointer              data;
  PangoAttrDataCopyFunc copy_func;
  GDestroyNotify        destroy_func;
} PangoAttrShape;
</programlisting>
<para>
The <link linkend="PangoAttrShape"><type>PangoAttrShape</type></link> structure is used to represent attributes which 
impose shape restrictions.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="PangoAttribute">PangoAttribute</link>&nbsp;<structfield>attr</structfield>;</term>
<listitem><simpara>the common portion of the attribute
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="PangoRectangle">PangoRectangle</link>&nbsp;<structfield>ink_rect</structfield>;</term>
<listitem><simpara>the ink rectangle to restrict to
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="PangoRectangle">PangoRectangle</link>&nbsp;<structfield>logical_rect</structfield>;</term>
<listitem><simpara>the logical rectangle to restrict to
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="gpointer">gpointer</link>&nbsp;<structfield>data</structfield>;</term>
<listitem><simpara>user data set (see <link linkend="pango-attr-shape-new-with-data"><function>pango_attr_shape_new_with_data()</function></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="PangoAttrDataCopyFunc">PangoAttrDataCopyFunc</link>&nbsp;<structfield>copy_func</structfield>;</term>
<listitem><simpara>copy function for the user data
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="GDestroyNotify">GDestroyNotify</link>&nbsp;<structfield>destroy_func</structfield>;</term>
<listitem><simpara>destroy function for the user data

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoAttrSize" role="struct"/>PangoAttrSize</title>
<indexterm><primary>PangoAttrSize</primary></indexterm><programlisting>typedef struct {
  PangoAttribute attr;
  int size;
  guint absolute : 1;
} PangoAttrSize;
</programlisting>
<para>
The <link linkend="PangoAttrShape"><type>PangoAttrShape</type></link> structure is used to represent attributes which
set font size.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="PangoAttribute">PangoAttribute</link>&nbsp;<structfield>attr</structfield>;</term>
<listitem><simpara>the common portion of the attribute
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="int">int</link>&nbsp;<structfield>size</structfield>;</term>
<listitem><simpara>size of font, in units of 1/<link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link> of a point (for
  <link linkend="PANGO-ATTR-SIZE:CAPS"><literal>PANGO_ATTR_SIZE</literal></link>) or of a device uni (for <link linkend="PANGO-ATTR-ABSOLUTE-SIZE:CAPS"><literal>PANGO_ATTR_ABSOLUTE_SIZE</literal></link>)
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="guint">guint</link>&nbsp;<structfield>absolute</structfield>&nbsp;:&nbsp;1;</term>
<listitem><simpara>whether the font size is in device units or points.
   This field is only present for compatibility with Pango-1.8.0
   (<link linkend="PANGO-ATTR-ABSOLUTE-SIZE:CAPS"><literal>PANGO_ATTR_ABSOLUTE_SIZE</literal></link> was added in 1.8.1); and always will
   be <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> for <link linkend="PANGO-ATTR-SIZE:CAPS"><literal>PANGO_ATTR_SIZE</literal></link> and <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> for <link linkend="PANGO-ATTR-ABSOLUTE-SIZE:CAPS"><literal>PANGO_ATTR_ABSOLUTE_SIZE</literal></link>.

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-parse-markup" role="function"/>pango_parse_markup ()</title>
<indexterm><primary>pango_parse_markup</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_parse_markup                  (const <link linkend="char">char</link> *markup_text,
                                                         <link linkend="int">int</link> length,
                                                         <link linkend="gunichar">gunichar</link> accel_marker,
                                                         <link linkend="PangoAttrList">PangoAttrList</link> **attr_list,
                                                         <link linkend="char">char</link> **text,
                                                         <link linkend="gunichar">gunichar</link> *accel_char,
                                                         <link linkend="GError">GError</link> **error);</programlisting>
<para>
Parses marked-up text (see
<link linkend="PangoMarkupFormat">markup format</link>) to create
a plain-text string and an attribute list.
</para>
<para>
If <parameter>accel_marker</parameter> is nonzero, the given character will mark the
character following it as an accelerator. For example, <parameter>accel_marker</parameter>
might be an ampersand or underscore. All characters marked
as an accelerator will receive a <link linkend="PANGO-UNDERLINE-LOW:CAPS"><literal>PANGO_UNDERLINE_LOW</literal></link> attribute,
and the first character so marked will be returned in <parameter>accel_char</parameter>.
Two <parameter>accel_marker</parameter> characters following each other produce a single
literal <parameter>accel_marker</parameter> character.
</para>
<para>
If any error happens, none of the output arguments are touched except
for <parameter>error</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>markup_text</parameter>&nbsp;:</term>
<listitem><simpara> markup to parse (see <link linkend="PangoMarkupFormat">markup format</link>)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>length</parameter>&nbsp;:</term>
<listitem><simpara> length of <parameter>markup_text</parameter>, or -1 if nul-terminated
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_marker</parameter>&nbsp;:</term>
<listitem><simpara> character that precedes an accelerator, or 0 for none
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attr_list</parameter>&nbsp;:</term>
<listitem><simpara> address of return location for a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>text</parameter>&nbsp;:</term>
<listitem><simpara> address of return location for text with tags stripped, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>accel_char</parameter>&nbsp;:</term>
<listitem><simpara> address of return location for accelerator char, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>error</parameter>&nbsp;:</term>
<listitem><simpara> address of return location for errors, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if <parameter>error</parameter> is set, otherwise <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-type-register" role="function"/>pango_attr_type_register ()</title>
<indexterm><primary>pango_attr_type_register</primary></indexterm><programlisting><link linkend="PangoAttrType">PangoAttrType</link>       pango_attr_type_register            (const <link linkend="gchar">gchar</link> *name);</programlisting>
<para>
Allocate a new attribute type ID.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>name</parameter>&nbsp;:</term>
<listitem><simpara> an identifier for the type (currently unused.)
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the new type ID.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attribute-copy" role="function"/>pango_attribute_copy ()</title>
<indexterm><primary>pango_attribute_copy</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attribute_copy                (const <link linkend="PangoAttribute">PangoAttribute</link> *attr);</programlisting>
<para>
Make a copy of an attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>attr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttribute"><type>PangoAttribute</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attribute-equal" role="function"/>pango_attribute_equal ()</title>
<indexterm><primary>pango_attribute_equal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_attribute_equal               (const <link linkend="PangoAttribute">PangoAttribute</link> *attr1,
                                                         const <link linkend="PangoAttribute">PangoAttribute</link> *attr2);</programlisting>
<para>
Compare two attributes for equality. This compares only the
actual value of the two attributes and not the ranges that the
attributes apply to.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>attr1</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttribute"><type>PangoAttribute</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attr2</parameter>&nbsp;:</term>
<listitem><simpara> another <link linkend="PangoAttribute"><type>PangoAttribute</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the two attributes have the same value.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attribute-destroy" role="function"/>pango_attribute_destroy ()</title>
<indexterm><primary>pango_attribute_destroy</primary></indexterm><programlisting><link linkend="void">void</link>                pango_attribute_destroy             (<link linkend="PangoAttribute">PangoAttribute</link> *attr);</programlisting>
<para>
Destroy a <link linkend="PangoAttribute"><type>PangoAttribute</type></link> and free all associated memory.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>attr</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttribute"><type>PangoAttribute</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-language-new" role="function"/>pango_attr_language_new ()</title>
<indexterm><primary>pango_attr_language_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_language_new             (<link linkend="PangoLanguage">PangoLanguage</link> *language);</programlisting>
<para>
Create a new language tag attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>language</parameter>&nbsp;:</term>
<listitem><simpara> language tag
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-family-new" role="function"/>pango_attr_family_new ()</title>
<indexterm><primary>pango_attr_family_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_family_new               (const <link linkend="char">char</link> *family);</programlisting>
<para>
Create a new font family attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>family</parameter>&nbsp;:</term>
<listitem><simpara> the family or comma separated list of families
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-style-new" role="function"/>pango_attr_style_new ()</title>
<indexterm><primary>pango_attr_style_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_style_new                (<link linkend="PangoStyle">PangoStyle</link> style);</programlisting>
<para>
Create a new font slant style attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>style</parameter>&nbsp;:</term>
<listitem><simpara> the slant style
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-variant-new" role="function"/>pango_attr_variant_new ()</title>
<indexterm><primary>pango_attr_variant_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_variant_new              (<link linkend="PangoVariant">PangoVariant</link> variant);</programlisting>
<para>
Create a new font variant attribute (normal or small caps)</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>variant</parameter>&nbsp;:</term>
<listitem><simpara> the variant
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-stretch-new" role="function"/>pango_attr_stretch_new ()</title>
<indexterm><primary>pango_attr_stretch_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_stretch_new              (<link linkend="PangoStretch">PangoStretch</link> stretch);</programlisting>
<para>
Create a new font stretch attribute</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>stretch</parameter>&nbsp;:</term>
<listitem><simpara> the stretch
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-weight-new" role="function"/>pango_attr_weight_new ()</title>
<indexterm><primary>pango_attr_weight_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_weight_new               (<link linkend="PangoWeight">PangoWeight</link> weight);</programlisting>
<para>
Create a new font weight attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>weight</parameter>&nbsp;:</term>
<listitem><simpara> the weight
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-size-new" role="function"/>pango_attr_size_new ()</title>
<indexterm><primary>pango_attr_size_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_size_new                 (<link linkend="int">int</link> size);</programlisting>
<para>
Create a new font-size attribute in fractional points.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
<listitem><simpara> the font size, in <link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link><!-- -->ths of a point.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-size-new-absolute" role="function" condition="since:1.8"/>pango_attr_size_new_absolute ()</title>
<indexterm role="1.8"><primary>pango_attr_size_new_absolute</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_size_new_absolute        (<link linkend="int">int</link> size);</programlisting>
<para>
Create a new font-size attribute in device units.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>size</parameter>&nbsp;:</term>
<listitem><simpara> the font size, in <link linkend="PANGO-SCALE:CAPS"><literal>PANGO_SCALE</literal></link><!-- -->ths of a device unit.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.8
</para></refsect2>
<refsect2>
<title><anchor id="pango-attr-font-desc-new" role="function"/>pango_attr_font_desc_new ()</title>
<indexterm><primary>pango_attr_font_desc_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_font_desc_new            (const <link linkend="PangoFontDescription">PangoFontDescription</link> *desc);</programlisting>
<para>
Create a new font description attribute. This attribute
allows setting family, style, weight, variant, stretch,
and size simultaneously.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>desc</parameter>&nbsp;:</term>
<listitem><simpara> the font description
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>  the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-foreground-new" role="function"/>pango_attr_foreground_new ()</title>
<indexterm><primary>pango_attr_foreground_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_foreground_new           (<link linkend="guint16">guint16</link> red,
                                                         <link linkend="guint16">guint16</link> green,
                                                         <link linkend="guint16">guint16</link> blue);</programlisting>
<para>
Create a new foreground color attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>red</parameter>&nbsp;:</term>
<listitem><simpara> the red value (ranging from 0 to 65535)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>green</parameter>&nbsp;:</term>
<listitem><simpara> the green value
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>blue</parameter>&nbsp;:</term>
<listitem><simpara> the blue value
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-background-new" role="function"/>pango_attr_background_new ()</title>
<indexterm><primary>pango_attr_background_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_background_new           (<link linkend="guint16">guint16</link> red,
                                                         <link linkend="guint16">guint16</link> green,
                                                         <link linkend="guint16">guint16</link> blue);</programlisting>
<para>
Create a new background color attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>red</parameter>&nbsp;:</term>
<listitem><simpara> the red value (ranging from 0 to 65535)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>green</parameter>&nbsp;:</term>
<listitem><simpara> the green value
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>blue</parameter>&nbsp;:</term>
<listitem><simpara> the blue value
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-strikethrough-new" role="function"/>pango_attr_strikethrough_new ()</title>
<indexterm><primary>pango_attr_strikethrough_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_strikethrough_new        (<link linkend="gboolean">gboolean</link> strikethrough);</programlisting>
<para>
Create a new strike-through attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>strikethrough</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the text should be struck-through.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-strikethrough-color-new" role="function" condition="since:1.8"/>pango_attr_strikethrough_color_new ()</title>
<indexterm role="1.8"><primary>pango_attr_strikethrough_color_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_strikethrough_color_new  (<link linkend="guint16">guint16</link> red,
                                                         <link linkend="guint16">guint16</link> green,
                                                         <link linkend="guint16">guint16</link> blue);</programlisting>
<para>
Create a new strikethrough color attribute. This attribute
modifies the color of strikethrough lines. If not set, strikethrough
lines will use the foreground color.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>red</parameter>&nbsp;:</term>
<listitem><simpara> the red value (ranging from 0 to 65535)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>green</parameter>&nbsp;:</term>
<listitem><simpara> the green value
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>blue</parameter>&nbsp;:</term>
<listitem><simpara> the blue value
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.8
</para></refsect2>
<refsect2>
<title><anchor id="pango-attr-underline-new" role="function"/>pango_attr_underline_new ()</title>
<indexterm><primary>pango_attr_underline_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_underline_new            (<link linkend="PangoUnderline">PangoUnderline</link> underline);</programlisting>
<para>
Create a new underline-style attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>underline</parameter>&nbsp;:</term>
<listitem><simpara> the underline style.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-underline-color-new" role="function" condition="since:1.8"/>pango_attr_underline_color_new ()</title>
<indexterm role="1.8"><primary>pango_attr_underline_color_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_underline_color_new      (<link linkend="guint16">guint16</link> red,
                                                         <link linkend="guint16">guint16</link> green,
                                                         <link linkend="guint16">guint16</link> blue);</programlisting>
<para>
Create a new underline color attribute. This attribute
modifies the color of underlines. If not set, underlines
will use the foreground color.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>red</parameter>&nbsp;:</term>
<listitem><simpara> the red value (ranging from 0 to 65535)
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>green</parameter>&nbsp;:</term>
<listitem><simpara> the green value
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>blue</parameter>&nbsp;:</term>
<listitem><simpara> the blue value
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.8
</para></refsect2>
<refsect2>
<title><anchor id="PangoUnderline" role="enum"/>enum PangoUnderline</title>
<indexterm><primary>PangoUnderline</primary></indexterm><programlisting>typedef enum {
  PANGO_UNDERLINE_NONE,
  PANGO_UNDERLINE_SINGLE,
  PANGO_UNDERLINE_DOUBLE,
  PANGO_UNDERLINE_LOW,
  PANGO_UNDERLINE_ERROR
} PangoUnderline;
</programlisting>
<para>
the <link linkend="PangoUnderline"><type>PangoUnderline</type></link> enumeration is used to specify
whether text should be underlined, and if so, the type
of underlining.
</para><variablelist role="enum">
<varlistentry>
<term><anchor id="PANGO-UNDERLINE-NONE:CAPS" role="constant"/><literal>PANGO_UNDERLINE_NONE</literal></term>
<listitem><simpara>no underline should be drawn
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-UNDERLINE-SINGLE:CAPS" role="constant"/><literal>PANGO_UNDERLINE_SINGLE</literal></term>
<listitem><simpara>a single underline should be drawn
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-UNDERLINE-DOUBLE:CAPS" role="constant"/><literal>PANGO_UNDERLINE_DOUBLE</literal></term>
<listitem><simpara>a double underline should be drawn
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-UNDERLINE-LOW:CAPS" role="constant"/><literal>PANGO_UNDERLINE_LOW</literal></term>
<listitem><simpara>a single underline should be drawn at a position
                      beneath the ink extents of the text being
                      underlined. This should be used only for underlining
                      single characters, such as for keyboard
                      accelerators. <link linkend="PANGO-UNDERLINE-SINGLE:CAPS"><literal>PANGO_UNDERLINE_SINGLE</literal></link> should
                      be used for extended portions of text.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-UNDERLINE-ERROR:CAPS" role="constant"/><literal>PANGO_UNDERLINE_ERROR</literal></term>
<listitem><simpara>a wavy underline should be drawn below.
                      This underline is typically used to indicate
                      an error such as a possilble mispelling; in some
                      cases a contrasting color may automatically
                      be used. This type of underlining is available
                      since Pango 1.4.

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PANGO-TYPE-UNDERLINE:CAPS" role="macro"/>PANGO_TYPE_UNDERLINE</title>
<indexterm><primary>PANGO_TYPE_UNDERLINE</primary></indexterm><programlisting>#define PANGO_TYPE_UNDERLINE (pango_underline_get_type())
</programlisting>
<para>
The <link linkend="GObject"><type>GObject</type></link> type for <link linkend="PangoUnderline"><type>PangoUnderline</type></link>.
</para></refsect2>
<refsect2>
<title><anchor id="pango-attr-shape-new" role="function"/>pango_attr_shape_new ()</title>
<indexterm><primary>pango_attr_shape_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_shape_new                (const <link linkend="PangoRectangle">PangoRectangle</link> *ink_rect,
                                                         const <link linkend="PangoRectangle">PangoRectangle</link> *logical_rect);</programlisting>
<para>
Create a new shape attribute. A shape is used to impose a
particular ink and logical rectangle on the result of shaping a
particular glyph. This might be used, for instance, for
embedding a picture or a widget inside a <link linkend="PangoLayout"><type>PangoLayout</type></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ink_rect</parameter>&nbsp;:</term>
<listitem><simpara>     ink rectangle to assign to each character
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>logical_rect</parameter>&nbsp;:</term>
<listitem><simpara> logical rectangle to assign to each character
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-shape-new-with-data" role="function" condition="since:1.8"/>pango_attr_shape_new_with_data ()</title>
<indexterm role="1.8"><primary>pango_attr_shape_new_with_data</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_shape_new_with_data      (const <link linkend="PangoRectangle">PangoRectangle</link> *ink_rect,
                                                         const <link linkend="PangoRectangle">PangoRectangle</link> *logical_rect,
                                                         <link linkend="gpointer">gpointer</link> data,
                                                         <link linkend="PangoAttrDataCopyFunc">PangoAttrDataCopyFunc</link> copy_func,
                                                         <link linkend="GDestroyNotify">GDestroyNotify</link> destroy_func);</programlisting>
<para>
Like <link linkend="pango-attr-shape-new"><function>pango_attr_shape_new()</function></link>, but a user data pointer is also
provided; this pointer can be accessed when later
rendering the glyph.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ink_rect</parameter>&nbsp;:</term>
<listitem><simpara>     ink rectangle to assign to each character
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>logical_rect</parameter>&nbsp;:</term>
<listitem><simpara> logical rectangle to assign to each character
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>         user data pointer
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>copy_func</parameter>&nbsp;:</term>
<listitem><simpara>    function to copy <parameter>data</parameter> when the attribute
               is copied. If <link linkend="NULL:CAPS"><literal>NULL</literal></link>, <parameter>data</parameter> is simply copied
               as a pointer.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>destroy_func</parameter>&nbsp;:</term>
<listitem><simpara> function to free <parameter>data</parameter> when the attribute
               is freed, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.8
</para></refsect2>
<refsect2>
<title><anchor id="PangoAttrDataCopyFunc" role="function"/>PangoAttrDataCopyFunc ()</title>
<indexterm><primary>PangoAttrDataCopyFunc</primary></indexterm><programlisting><link linkend="gpointer">gpointer</link>            (*PangoAttrDataCopyFunc)            (<link linkend="gconstpointer">gconstpointer</link> data);</programlisting>
<para>
A copy function passed to attribute new functions that take
user data.
</para><variablelist role="params">
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>the user data
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>a new copy of <parameter>data</parameter>.


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-scale-new" role="function"/>pango_attr_scale_new ()</title>
<indexterm><primary>pango_attr_scale_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_scale_new                (<link linkend="double">double</link> scale_factor);</programlisting>
<para>
Create a new font size scale attribute. The base font for the
affected text will have its size multiplied by <parameter>scale_factor</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>scale_factor</parameter>&nbsp;:</term>
<listitem><simpara> factor to scale the font
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PANGO-SCALE-XX-SMALL:CAPS" role="macro"/>PANGO_SCALE_XX_SMALL</title>
<indexterm><primary>PANGO_SCALE_XX_SMALL</primary></indexterm><programlisting>#define PANGO_SCALE_XX_SMALL ((double)0.5787037037037)
</programlisting>
<para>
The scale factor for three shrinking steps (1 / (1.2 * 1.2 * 1.2)).
</para></refsect2>
<refsect2>
<title><anchor id="PANGO-SCALE-X-SMALL:CAPS" role="macro"/>PANGO_SCALE_X_SMALL</title>
<indexterm><primary>PANGO_SCALE_X_SMALL</primary></indexterm><programlisting>#define PANGO_SCALE_X_SMALL  ((double)0.6444444444444)
</programlisting>
<para>
The scale factor for two shrinking steps (1 / (1.2 * 1.2)).
</para></refsect2>
<refsect2>
<title><anchor id="PANGO-SCALE-SMALL:CAPS" role="macro"/>PANGO_SCALE_SMALL</title>
<indexterm><primary>PANGO_SCALE_SMALL</primary></indexterm><programlisting>#define PANGO_SCALE_SMALL    ((double)0.8333333333333)
</programlisting>
<para>
The scale factor for one shrinking step (1 / 1.2).
</para></refsect2>
<refsect2>
<title><anchor id="PANGO-SCALE-MEDIUM:CAPS" role="macro"/>PANGO_SCALE_MEDIUM</title>
<indexterm><primary>PANGO_SCALE_MEDIUM</primary></indexterm><programlisting>#define PANGO_SCALE_MEDIUM   ((double)1.0)
</programlisting>
<para>
The scale factor for normal size (1.0).
</para></refsect2>
<refsect2>
<title><anchor id="PANGO-SCALE-LARGE:CAPS" role="macro"/>PANGO_SCALE_LARGE</title>
<indexterm><primary>PANGO_SCALE_LARGE</primary></indexterm><programlisting>#define PANGO_SCALE_LARGE    ((double)1.2)
</programlisting>
<para>
The scale factor for one magnification step (1.2).
</para></refsect2>
<refsect2>
<title><anchor id="PANGO-SCALE-X-LARGE:CAPS" role="macro"/>PANGO_SCALE_X_LARGE</title>
<indexterm><primary>PANGO_SCALE_X_LARGE</primary></indexterm><programlisting>#define PANGO_SCALE_X_LARGE  ((double)1.4399999999999)
</programlisting>
<para>
The scale factor for two magnification steps (1.2 * 1.2).
</para></refsect2>
<refsect2>
<title><anchor id="PANGO-SCALE-XX-LARGE:CAPS" role="macro"/>PANGO_SCALE_XX_LARGE</title>
<indexterm><primary>PANGO_SCALE_XX_LARGE</primary></indexterm><programlisting>#define PANGO_SCALE_XX_LARGE ((double)1.728)
</programlisting>
<para>
The scale factor for three magnification steps (1.2 * 1.2 * 1.2).
</para></refsect2>
<refsect2>
<title><anchor id="pango-attr-rise-new" role="function"/>pango_attr_rise_new ()</title>
<indexterm><primary>pango_attr_rise_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_rise_new                 (<link linkend="int">int</link> rise);</programlisting>
<para>
Create a new baseline displacement attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>rise</parameter>&nbsp;:</term>
<listitem><simpara> the amount that the text should be displaced vertically,
       in Pango units. Positive values displace the text upwards.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-letter-spacing-new" role="function" condition="since:1.6"/>pango_attr_letter_spacing_new ()</title>
<indexterm role="1.6"><primary>pango_attr_letter_spacing_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_letter_spacing_new       (<link linkend="int">int</link> letter_spacing);</programlisting>
<para>
Create a new letter-spacing attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>letter_spacing</parameter>&nbsp;:</term>
<listitem><simpara> amount of extra space to add between graphemes
  of the text, in Pango units.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.6
</para></refsect2>
<refsect2>
<title><anchor id="pango-attr-fallback-new" role="function" condition="since:1.4"/>pango_attr_fallback_new ()</title>
<indexterm role="1.4"><primary>pango_attr_fallback_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_fallback_new             (<link linkend="gboolean">gboolean</link> enable_fallback);</programlisting>
<para>
Create a new font fallback attribute.
</para>
<para>
If fallback is disabled, characters will only be used from the
closest matching font on the system. No fallback will be done to
other fonts on the system that might contain the characters in the
text.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>enable_fallback</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if we should fall back on other fonts
                  for characters the active font is missing.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>
<refsect2>
<title><anchor id="pango-attr-gravity-new" role="function" condition="since:1.16"/>pango_attr_gravity_new ()</title>
<indexterm role="1.16"><primary>pango_attr_gravity_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_gravity_new              (<link linkend="PangoGravity">PangoGravity</link> gravity);</programlisting>
<para>
Create a new gravity attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>gravity</parameter>&nbsp;:</term>
<listitem><simpara> the gravity value; should not be <link linkend="PANGO-GRAVITY-AUTO:CAPS"><literal>PANGO_GRAVITY_AUTO</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.16
</para></refsect2>
<refsect2>
<title><anchor id="pango-attr-gravity-hint-new" role="function" condition="since:1.16"/>pango_attr_gravity_hint_new ()</title>
<indexterm role="1.16"><primary>pango_attr_gravity_hint_new</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_gravity_hint_new         (<link linkend="PangoGravityHint">PangoGravityHint</link> hint);</programlisting>
<para>
Create a new gravity hint attribute.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>hint</parameter>&nbsp;:</term>
<listitem><simpara> the gravity hint value.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttribute"><type>PangoAttribute</type></link>, which should be
              freed with <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.16
</para></refsect2>
<refsect2>
<title><anchor id="PangoColor" role="struct"/>PangoColor</title>
<indexterm><primary>PangoColor</primary></indexterm><programlisting>typedef struct {
  guint16 red;
  guint16 green;
  guint16 blue;
} PangoColor;
</programlisting>
<para>
The <link linkend="PangoColor"><type>PangoColor</type></link> structure is used to
represent a color in an uncalibrated RGB color-space.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="guint16">guint16</link>&nbsp;<structfield>red</structfield>;</term>
<listitem><simpara>The red component of the color. This is a value between 0 and 65535, 
      with 65535 indicating full intensity.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="guint16">guint16</link>&nbsp;<structfield>green</structfield>;</term>
<listitem><simpara>The green component of the color. This is a value between 0 and 65535, 
      with 65535 indicating full intensity.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="guint16">guint16</link>&nbsp;<structfield>blue</structfield>;</term>
<listitem><simpara>The blue component of the color. This is a value between 0 and 65535, 
      with 65535 indicating full intensity.

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PANGO-TYPE-COLOR:CAPS" role="macro"/>PANGO_TYPE_COLOR</title>
<indexterm><primary>PANGO_TYPE_COLOR</primary></indexterm><programlisting>#define PANGO_TYPE_COLOR pango_color_get_type ()
</programlisting>
<para>
The <link linkend="GObject"><type>GObject</type></link> type for <link linkend="PangoColor"><type>PangoColor</type></link>.
</para></refsect2>
<refsect2>
<title><anchor id="pango-color-parse" role="function"/>pango_color_parse ()</title>
<indexterm><primary>pango_color_parse</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_color_parse                   (<link linkend="PangoColor">PangoColor</link> *color,
                                                         const <link linkend="char">char</link> *spec);</programlisting>
<para>
Fill in the fields of a color from a string specification. The
string can either one of a large set of standard names. (Taken
from the X11 <filename>rgb.txt</filename> file), or it can be a hex value in the
form '&num;rgb' '&num;rrggbb' '&num;rrrgggbbb' or '&num;rrrrggggbbbb' where
'r', 'g' and 'b' are hex digits of the red, green, and blue
components of the color, respectively. (White in the four
forms is '&num;fff' '&num;ffffff' '&num;fffffffff' and '&num;ffffffffffff')</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoColor"><type>PangoColor</type></link> structure in which to store the result
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>spec</parameter>&nbsp;:</term>
<listitem><simpara> a string specifying the new color
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if parsing of the specifier succeeded,
  otherwise false.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-color-copy" role="function"/>pango_color_copy ()</title>
<indexterm><primary>pango_color_copy</primary></indexterm><programlisting><link linkend="PangoColor">PangoColor</link>*         pango_color_copy                    (const <link linkend="PangoColor">PangoColor</link> *src);</programlisting>
<para>
Creates a copy of <parameter>src</parameter>, which should be freed with
<link linkend="pango-color-free"><function>pango_color_free()</function></link>. Primarily used by language bindings,
not that useful otherwise (since colors can just be copied
by assignment in C).</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>src</parameter>&nbsp;:</term>
<listitem><simpara> color to copy
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoColor"><type>PangoColor</type></link>, which should
              be freed with <link linkend="pango-color-free"><function>pango_color_free()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-color-free" role="function"/>pango_color_free ()</title>
<indexterm><primary>pango_color_free</primary></indexterm><programlisting><link linkend="void">void</link>                pango_color_free                    (<link linkend="PangoColor">PangoColor</link> *color);</programlisting>
<para>
Frees a color allocated by <link linkend="pango-color-copy"><function>pango_color_copy()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> an allocated <link linkend="PangoColor"><type>PangoColor</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-color-to-string" role="function" condition="since:1.16"/>pango_color_to_string ()</title>
<indexterm role="1.16"><primary>pango_color_to_string</primary></indexterm><programlisting><link linkend="gchar">gchar</link>*              pango_color_to_string               (const <link linkend="PangoColor">PangoColor</link> *color);</programlisting>
<para>
Returns a textual specification of <parameter>color</parameter> in the hexadecimal form
<literal>&num;rrrrggggbbbb</literal>, where <literal>r</literal>,
<literal>g</literal> and <literal>b</literal> are hex digits representing
the red, green, and blue components respectively.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>color</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoColor"><type>PangoColor</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly-allocated text string that must be freed with <link linkend="g-free"><function>g_free()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.16
</para></refsect2>
<refsect2>
<title><anchor id="PangoLanguage" role="struct"/>PangoLanguage</title>
<indexterm><primary>PangoLanguage</primary></indexterm><programlisting>typedef struct _PangoLanguage PangoLanguage;</programlisting>
<para>
The <link linkend="PangoLanguage"><type>PangoLanguage</type></link> structure is used to
represent a language.
</para>
<para>
<link linkend="PangoLanguage"><type>PangoLanguage</type></link> pointers can be efficiently 
copied and compared with each other.
</para></refsect2>
<refsect2>
<title><anchor id="PANGO-TYPE-LANGUAGE:CAPS" role="macro"/>PANGO_TYPE_LANGUAGE</title>
<indexterm><primary>PANGO_TYPE_LANGUAGE</primary></indexterm><programlisting>#define PANGO_TYPE_LANGUAGE (pango_language_get_type ())
</programlisting>
<para>
The <link linkend="GObject"><type>GObject</type></link> type for <link linkend="PangoLanguage"><type>PangoLanguage</type></link>. 
</para></refsect2>
<refsect2>
<title><anchor id="pango-language-from-string" role="function"/>pango_language_from_string ()</title>
<indexterm><primary>pango_language_from_string</primary></indexterm><programlisting><link linkend="PangoLanguage">PangoLanguage</link>*      pango_language_from_string          (const <link linkend="char">char</link> *language);</programlisting>
<para>
Take a RFC-3066 format language tag as a string and convert it to a
<link linkend="PangoLanguage"><type>PangoLanguage</type></link> pointer that can be efficiently copied (copy the
pointer) and compared with other language tags (compare the
pointer.)
</para>
<para>
This function first canonicalizes the string by converting it to
lowercase, mapping '_' to '-', and stripping all characters other
than letters and '-'.
</para>
<para>
Use <link linkend="pango-language-get-default"><function>pango_language_get_default()</function></link> if you want to get the <link linkend="PangoLanguage"><type>PangoLanguage</type></link> for
the current locale of the process.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>language</parameter>&nbsp;:</term>
<listitem><simpara> a string representing a language tag
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> an opaque pointer to a <link linkend="PangoLanguage"><type>PangoLanguage</type></link> structure.
              this will be valid forever after.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-language-to-string" role="macro"/>pango_language_to_string()</title>
<indexterm><primary>pango_language_to_string</primary></indexterm><programlisting>#define pango_language_to_string(language) ((const char *)language)
</programlisting>
<para>
Returns a RFC-3066 format string representing the given language tag. 
</para><variablelist role="params">
<varlistentry><term><parameter>language</parameter>&nbsp;:</term>
<listitem><simpara>a language tag.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara>a string representing the language tag.


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-language-matches" role="function"/>pango_language_matches ()</title>
<indexterm><primary>pango_language_matches</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_language_matches              (<link linkend="PangoLanguage">PangoLanguage</link> *language,
                                                         const <link linkend="char">char</link> *range_list);</programlisting>
<para>
Checks if a language tag matches one of the elements in a list of
language ranges. A language tag is considered to match a range
in the list if the range is '*', the range is exactly the tag,
or the range is a prefix of the tag, and the character after it
in the tag is '-'.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>language</parameter>&nbsp;:</term>
<listitem><simpara> a language tag (see <link linkend="pango-language-from-string"><function>pango_language_from_string()</function></link>),
           <link linkend="NULL:CAPS"><literal>NULL</literal></link> is allowed and matches nothing but '*'
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>range_list</parameter>&nbsp;:</term>
<listitem><simpara> a list of language ranges, separated by ';', ':',
  ',', or space characters.
  Each element must either be '*', or a RFC 3066 language range
  canonicalized as by <link linkend="pango-language-from-string"><function>pango_language_from_string()</function></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if a match was found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoAttrList" role="struct"/>PangoAttrList</title>
<indexterm><primary>PangoAttrList</primary></indexterm><programlisting>typedef struct _PangoAttrList PangoAttrList;</programlisting>
<para>
The <link linkend="PangoAttrList"><type>PangoAttrList</type></link> structure represents a list of attributes
that apply to a section of text. The attributes are, in general,
allowed to overlap in an arbitrary fashion, however, if the
attributes are manipulated only through <link linkend="pango-attr-list-change"><function>pango_attr_list_change()</function></link>,
the overlap between properties will meet stricter criteria.
</para>
<para>
Since the <link linkend="PangoAttrList"><type>PangoAttrList</type></link> structure is stored as a linear list,
it is not suitable for storing attributes for large amounts
of text. In general, you should not use a single <link linkend="PangoAttrList"><type>PangoAttrList</type></link>
for more than one paragraph of text.
</para></refsect2>
<refsect2>
<title><anchor id="PANGO-TYPE-ATTR-LIST:CAPS" role="macro"/>PANGO_TYPE_ATTR_LIST</title>
<indexterm><primary>PANGO_TYPE_ATTR_LIST</primary></indexterm><programlisting>#define PANGO_TYPE_ATTR_LIST pango_attr_list_get_type ()
</programlisting>
<para>
The <link linkend="GObject"><type>GObject</type></link> type for <link linkend="PangoAttrList"><type>PangoAttrList</type></link>.
</para></refsect2>
<refsect2>
<title><anchor id="pango-attr-list-new" role="function"/>pango_attr_list_new ()</title>
<indexterm><primary>pango_attr_list_new</primary></indexterm><programlisting><link linkend="PangoAttrList">PangoAttrList</link>*      pango_attr_list_new                 (void);</programlisting>
<para>
Create a new empty attribute list with a reference count of one.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttrList"><type>PangoAttrList</type></link>, which should
              be freed with <link linkend="pango-attr-list-unref"><function>pango_attr_list_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-list-ref" role="function" condition="since:1.10"/>pango_attr_list_ref ()</title>
<indexterm role="1.10"><primary>pango_attr_list_ref</primary></indexterm><programlisting><link linkend="PangoAttrList">PangoAttrList</link>*      pango_attr_list_ref                 (<link linkend="PangoAttrList">PangoAttrList</link> *list);</programlisting>
<para>
Increase the reference count of the given attribute list by one.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The attribute list passed in

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.10
</para></refsect2>
<refsect2>
<title><anchor id="pango-attr-list-unref" role="function"/>pango_attr_list_unref ()</title>
<indexterm><primary>pango_attr_list_unref</primary></indexterm><programlisting><link linkend="void">void</link>                pango_attr_list_unref               (<link linkend="PangoAttrList">PangoAttrList</link> *list);</programlisting>
<para>
Decrease the reference count of the given attribute list by one.
If the result is zero, free the attribute list and the attributes
it contains.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-list-copy" role="function"/>pango_attr_list_copy ()</title>
<indexterm><primary>pango_attr_list_copy</primary></indexterm><programlisting><link linkend="PangoAttrList">PangoAttrList</link>*      pango_attr_list_copy                (<link linkend="PangoAttrList">PangoAttrList</link> *list);</programlisting>
<para>
Copy <parameter>list</parameter> and return an identical new list.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttrList"><type>PangoAttrList</type></link>, with a
              reference count of one, which should
              be freed with <link linkend="pango-attr-list-unref"><function>pango_attr_list_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-list-insert" role="function"/>pango_attr_list_insert ()</title>
<indexterm><primary>pango_attr_list_insert</primary></indexterm><programlisting><link linkend="void">void</link>                pango_attr_list_insert              (<link linkend="PangoAttrList">PangoAttrList</link> *list,
                                                         <link linkend="PangoAttribute">PangoAttribute</link> *attr);</programlisting>
<para>
Insert the given attribute into the <link linkend="PangoAttrList"><type>PangoAttrList</type></link>. It will
be inserted after all other attributes with a matching
<parameter>start_index</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attr</parameter>&nbsp;:</term>
<listitem><simpara> the attribute to insert. Ownership of this value is
       assumed by the list.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-list-insert-before" role="function"/>pango_attr_list_insert_before ()</title>
<indexterm><primary>pango_attr_list_insert_before</primary></indexterm><programlisting><link linkend="void">void</link>                pango_attr_list_insert_before       (<link linkend="PangoAttrList">PangoAttrList</link> *list,
                                                         <link linkend="PangoAttribute">PangoAttribute</link> *attr);</programlisting>
<para>
Insert the given attribute into the <link linkend="PangoAttrList"><type>PangoAttrList</type></link>. It will
be inserted before all other attributes with a matching
<parameter>start_index</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attr</parameter>&nbsp;:</term>
<listitem><simpara> the attribute to insert. Ownership of this value is
       assumed by the list.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-list-change" role="function"/>pango_attr_list_change ()</title>
<indexterm><primary>pango_attr_list_change</primary></indexterm><programlisting><link linkend="void">void</link>                pango_attr_list_change              (<link linkend="PangoAttrList">PangoAttrList</link> *list,
                                                         <link linkend="PangoAttribute">PangoAttribute</link> *attr);</programlisting>
<para>
Insert the given attribute into the <link linkend="PangoAttrList"><type>PangoAttrList</type></link>. It will
replace any attributes of the same type on that segment
and be merged with any adjoining attributes that are identical.
</para>
<para>
This function is slower than <link linkend="pango-attr-list-insert"><function>pango_attr_list_insert()</function></link> for
creating a attribute list in order (potentially much slower
for large lists). However, <link linkend="pango-attr-list-insert"><function>pango_attr_list_insert()</function></link> is not
suitable for continually changing a set of attributes
since it never removes or combines existing attributes.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>attr</parameter>&nbsp;:</term>
<listitem><simpara> the attribute to insert. Ownership of this value is
       assumed by the list.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-list-splice" role="function"/>pango_attr_list_splice ()</title>
<indexterm><primary>pango_attr_list_splice</primary></indexterm><programlisting><link linkend="void">void</link>                pango_attr_list_splice              (<link linkend="PangoAttrList">PangoAttrList</link> *list,
                                                         <link linkend="PangoAttrList">PangoAttrList</link> *other,
                                                         <link linkend="gint">gint</link> pos,
                                                         <link linkend="gint">gint</link> len);</programlisting>
<para>
This function opens up a hole in <parameter>list</parameter>, fills it in with attributes from
the left, and then merges <parameter>other</parameter> on top of the hole.
</para>
<para>
This operation is equivalent to stretching every attribute
that applies at position <parameter>pos</parameter> in <parameter>list</parameter> by an amount <parameter>len</parameter>,
and then calling <link linkend="pango-attr-list-change"><function>pango_attr_list_change()</function></link> with a copy
of each attribute in <parameter>other</parameter> in sequence (offset in position by <parameter>pos</parameter>).
</para>
<para>
This operation proves useful for, for instance, inserting
a pre-edit string in the middle of an edit buffer.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>other</parameter>&nbsp;:</term>
<listitem><simpara> another <link linkend="PangoAttrList"><type>PangoAttrList</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>pos</parameter>&nbsp;:</term>
<listitem><simpara> the position in <parameter>list</parameter> at which to insert <parameter>other</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>len</parameter>&nbsp;:</term>
<listitem><simpara> the length of the spliced segment. (Note that this
      must be specified since the attributes in <parameter>other</parameter>
      may only be present at some subsection of this range)
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-list-filter" role="function" condition="since:1.2"/>pango_attr_list_filter ()</title>
<indexterm role="1.2"><primary>pango_attr_list_filter</primary></indexterm><programlisting><link linkend="PangoAttrList">PangoAttrList</link>*      pango_attr_list_filter              (<link linkend="PangoAttrList">PangoAttrList</link> *list,
                                                         <link linkend="PangoAttrFilterFunc">PangoAttrFilterFunc</link> func,
                                                         <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
Given a <link linkend="PangoAttrList"><type>PangoAttrList</type></link> and callback function, removes any elements
of <parameter>list</parameter> for which <parameter>func</parameter> returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> and inserts them into
a new list.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>func</parameter>&nbsp;:</term>
<listitem><simpara> callback function; returns <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if an attribute
       should be filtered out.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara> Data to be passed to <parameter>func</parameter>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the new <link linkend="PangoAttrList"><type>PangoAttrList</type></link> or <link linkend="NULL:CAPS"><literal>NULL</literal></link> if
 no attributes of the given types were found.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.2
</para></refsect2>
<refsect2>
<title><anchor id="PangoAttrFilterFunc" role="function"/>PangoAttrFilterFunc ()</title>
<indexterm><primary>PangoAttrFilterFunc</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            (*PangoAttrFilterFunc)              (<link linkend="PangoAttribute">PangoAttribute</link> *attribute,
                                                         <link linkend="gpointer">gpointer</link> data);</programlisting>
<para>
A predicate function used by <link linkend="pango-attr-list-filter"><function>pango_attr_list_filter()</function></link>
to filter out a subset of attributes for a list.
</para><variablelist role="params">
<varlistentry><term><parameter>attribute</parameter>&nbsp;:</term>
<listitem><simpara>a <link linkend="PangoAttribute"><type>PangoAttribute</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>data</parameter>&nbsp;:</term>
<listitem><simpara>callback data passed to <link linkend="pango-attr-list-filter"><function>pango_attr_list_filter()</function></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara><link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the attribute should be filtered out


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-list-get-iterator" role="function"/>pango_attr_list_get_iterator ()</title>
<indexterm><primary>pango_attr_list_get_iterator</primary></indexterm><programlisting><link linkend="PangoAttrIterator">PangoAttrIterator</link>*  pango_attr_list_get_iterator        (<link linkend="PangoAttrList">PangoAttrList</link> *list);</programlisting>
<para>
Create a iterator initialized to the beginning of the list.
<parameter>list</parameter> must not be modified until this iterator is freed.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>list</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttrIterator"><type>PangoAttrIterator</type></link>, which should
              be freed with <link linkend="pango-attr-iterator-destroy"><function>pango_attr_iterator_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoAttrIterator" role="struct"/>PangoAttrIterator</title>
<indexterm><primary>PangoAttrIterator</primary></indexterm><programlisting>typedef struct _PangoAttrIterator PangoAttrIterator;</programlisting>
<para>
The <link linkend="PangoAttrIterator"><type>PangoAttrIterator</type></link> structure is used to represent an
iterator through a <link linkend="PangoAttrList"><type>PangoAttrList</type></link>. A new iterator is created
with <link linkend="pango-attr-list-get-iterator"><function>pango_attr_list_get_iterator()</function></link>. Once the iterator
is created, it can be advanced through the style changes
in the text using <link linkend="pango-attr-iterator-next"><function>pango_attr_iterator_next()</function></link>. At each
style change, the range of the current style segment and the
attributes currently in effect can be queried.
</para></refsect2>
<refsect2>
<title><anchor id="pango-attr-iterator-copy" role="function"/>pango_attr_iterator_copy ()</title>
<indexterm><primary>pango_attr_iterator_copy</primary></indexterm><programlisting><link linkend="PangoAttrIterator">PangoAttrIterator</link>*  pango_attr_iterator_copy            (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator);</programlisting>
<para>
Copy a <link linkend="PangoAttrIterator"><type>PangoAttrIterator</type></link></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iterator</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrIterator"><type>PangoAttrIterator</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoAttrIterator"><type>PangoAttrIterator</type></link>, which should
              be freed with <link linkend="pango-attr-iterator-destroy"><function>pango_attr_iterator_destroy()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-iterator-next" role="function"/>pango_attr_iterator_next ()</title>
<indexterm><primary>pango_attr_iterator_next</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_attr_iterator_next            (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator);</programlisting>
<para>
Advance the iterator until the next change of style.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iterator</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrIterator"><type>PangoAttrIterator</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if the iterator is at the end of the list, otherwise <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-iterator-range" role="function"/>pango_attr_iterator_range ()</title>
<indexterm><primary>pango_attr_iterator_range</primary></indexterm><programlisting><link linkend="void">void</link>                pango_attr_iterator_range           (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator,
                                                         <link linkend="gint">gint</link> *start,
                                                         <link linkend="gint">gint</link> *end);</programlisting>
<para>
Get the range of the current segment. Note that the
stored return values are signed, not unsigned like
the values in <link linkend="PangoAttribute"><type>PangoAttribute</type></link>. To deal with this API
oversight, stored return values that wouldn't fit into
a signed integer are clamped to <link linkend="G-MAXINT:CAPS"><literal>G_MAXINT</literal></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iterator</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrIterator"><type>PangoAttrIterator</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>start</parameter>&nbsp;:</term>
<listitem><simpara> location to store the start of the range
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>end</parameter>&nbsp;:</term>
<listitem><simpara> location to store the end of the range
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-iterator-get" role="function"/>pango_attr_iterator_get ()</title>
<indexterm><primary>pango_attr_iterator_get</primary></indexterm><programlisting><link linkend="PangoAttribute">PangoAttribute</link>*     pango_attr_iterator_get             (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator,
                                                         <link linkend="PangoAttrType">PangoAttrType</link> type);</programlisting>
<para>
Find the current attribute of a particular type at the iterator
location. When multiple attributes of the same type overlap,
the attribute whose range starts closest to the current location
is used.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iterator</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrIterator"><type>PangoAttrIterator</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>type</parameter>&nbsp;:</term>
<listitem><simpara> the type of attribute to find.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the current attribute of the given type, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
              if no attribute of that type applies to the current
              location.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-iterator-get-font" role="function"/>pango_attr_iterator_get_font ()</title>
<indexterm><primary>pango_attr_iterator_get_font</primary></indexterm><programlisting><link linkend="void">void</link>                pango_attr_iterator_get_font        (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator,
                                                         <link linkend="PangoFontDescription">PangoFontDescription</link> *desc,
                                                         <link linkend="PangoLanguage">PangoLanguage</link> **language,
                                                         <link linkend="GSList">GSList</link> **extra_attrs);</programlisting>
<para>
Get the font and other attributes at the current iterator position.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iterator</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrIterator"><type>PangoAttrIterator</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>desc</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoFontDescription"><type>PangoFontDescription</type></link> to fill in with the current values.
       The family name in this structure will be set using
       <link linkend="pango-font-description-set-family-static"><function>pango_font_description_set_family_static()</function></link> using values from
       an attribute in the <link linkend="PangoAttrList"><type>PangoAttrList</type></link> associated with the iterator,
       so if you plan to keep it around, you must call:
       <literal>pango_font_description_set_family (desc, pango_font_description_get_family (desc))</literal>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>language</parameter>&nbsp;:</term>
<listitem><simpara> if non-<link linkend="NULL:CAPS"><literal>NULL</literal></link>, location to store language tag for item, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
           if none is found.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>extra_attrs</parameter>&nbsp;:</term>
<listitem><simpara> if non-<link linkend="NULL:CAPS"><literal>NULL</literal></link>, location in which to store a list of non-font
          attributes at the the current position; only the highest priority
          value of each attribute will be added to this list. In order
          to free this value, you must call <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link> on
          each member.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-attr-iterator-get-attrs" role="function" condition="since:1.2"/>pango_attr_iterator_get_attrs ()</title>
<indexterm role="1.2"><primary>pango_attr_iterator_get_attrs</primary></indexterm><programlisting><link linkend="GSList">GSList</link>*             pango_attr_iterator_get_attrs       (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator);</programlisting>
<para>
Gets a list of all attributes at the current position of the
iterator.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iterator</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrIterator"><type>PangoAttrIterator</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a list of all attributes for the current range.
  To free this value, call <link linkend="pango-attribute-destroy"><function>pango_attribute_destroy()</function></link> on
  each value and <link linkend="g-slist-free"><function>g_slist_free()</function></link> on the list.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.2
</para></refsect2>
<refsect2>
<title><anchor id="pango-attr-iterator-destroy" role="function"/>pango_attr_iterator_destroy ()</title>
<indexterm><primary>pango_attr_iterator_destroy</primary></indexterm><programlisting><link linkend="void">void</link>                pango_attr_iterator_destroy         (<link linkend="PangoAttrIterator">PangoAttrIterator</link> *iterator);</programlisting>
<para>
Destroy a <link linkend="PangoAttrIterator"><type>PangoAttrIterator</type></link> and free all associated memory.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>iterator</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoAttrIterator"><type>PangoAttrIterator</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>

</refsect1>




</refentry>
