<refentry id="pango-OpenType-Font-Handling">
<refmeta>
<refentrytitle role="top_of_page">OpenType Font Handling</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>PANGO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>OpenType Font Handling</refname>
<refpurpose>Obtaining information from OpenType tables</refpurpose>
<!--[<xref linkend="desc" endterm="desc.title"/>]-->
</refnamediv>
<refsect1>
<title>Stability Level</title>
Unstable, unless otherwise indicated
</refsect1>

<refsynopsisdiv role="synopsis">
<title role="synopsis.title">Synopsis</title>
<anchor id="PangoOTInfo"/><anchor id="PangoOTRuleset"/>
<synopsis>



typedef             <link linkend="PangoOTTag">PangoOTTag</link>;
                    <link linkend="PangoOTInfo-struct">PangoOTInfo</link>;
                    <link linkend="PangoOTBuffer">PangoOTBuffer</link>;
                    <link linkend="PangoOTGlyph">PangoOTGlyph</link>;
                    <link linkend="PangoOTRuleset-struct">PangoOTRuleset</link>;
                    <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link>;
enum                <link linkend="PangoOTTableType">PangoOTTableType</link>;
                    <link linkend="PangoOTFeatureMap">PangoOTFeatureMap</link>;
#define             <link linkend="PANGO-OT-TAG-MAKE:CAPS">PANGO_OT_TAG_MAKE</link>                   (c1,c2,c3,c4)
#define             <link linkend="PANGO-OT-TAG-MAKE-FROM-STRING:CAPS">PANGO_OT_TAG_MAKE_FROM_STRING</link>       (s)
#define             <link linkend="PANGO-OT-ALL-GLYPHS:CAPS">PANGO_OT_ALL_GLYPHS</link>
#define             <link linkend="PANGO-OT-NO-FEATURE:CAPS">PANGO_OT_NO_FEATURE</link>
#define             <link linkend="PANGO-OT-NO-SCRIPT:CAPS">PANGO_OT_NO_SCRIPT</link>
#define             <link linkend="PANGO-OT-DEFAULT-LANGUAGE:CAPS">PANGO_OT_DEFAULT_LANGUAGE</link>
#define             <link linkend="PANGO-OT-TAG-DEFAULT-LANGUAGE:CAPS">PANGO_OT_TAG_DEFAULT_LANGUAGE</link>
#define             <link linkend="PANGO-OT-TAG-DEFAULT-SCRIPT:CAPS">PANGO_OT_TAG_DEFAULT_SCRIPT</link>
<link linkend="PangoOTInfo">PangoOTInfo</link>*        <link linkend="pango-ot-info-get">pango_ot_info_get</link>                   (<link linkend="FT-Face">FT_Face</link> face);
<link linkend="gboolean">gboolean</link>            <link linkend="pango-ot-info-find-script">pango_ot_info_find_script</link>           (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="PangoOTTag">PangoOTTag</link> script_tag,
                                                         <link linkend="guint">guint</link> *script_index);
<link linkend="gboolean">gboolean</link>            <link linkend="pango-ot-info-find-language">pango_ot_info_find_language</link>         (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="guint">guint</link> script_index,
                                                         <link linkend="PangoOTTag">PangoOTTag</link> language_tag,
                                                         <link linkend="guint">guint</link> *language_index,
                                                         <link linkend="guint">guint</link> *required_feature_index);
<link linkend="gboolean">gboolean</link>            <link linkend="pango-ot-info-find-feature">pango_ot_info_find_feature</link>          (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="PangoOTTag">PangoOTTag</link> feature_tag,
                                                         <link linkend="guint">guint</link> script_index,
                                                         <link linkend="guint">guint</link> language_index,
                                                         <link linkend="guint">guint</link> *feature_index);
<link linkend="PangoOTTag">PangoOTTag</link>*         <link linkend="pango-ot-info-list-scripts">pango_ot_info_list_scripts</link>          (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type);
<link linkend="PangoOTTag">PangoOTTag</link>*         <link linkend="pango-ot-info-list-languages">pango_ot_info_list_languages</link>        (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="guint">guint</link> script_index,
                                                         <link linkend="PangoOTTag">PangoOTTag</link> language_tag);
<link linkend="PangoOTTag">PangoOTTag</link>*         <link linkend="pango-ot-info-list-features">pango_ot_info_list_features</link>         (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="PangoOTTag">PangoOTTag</link> tag,
                                                         <link linkend="guint">guint</link> script_index,
                                                         <link linkend="guint">guint</link> language_index);
<link linkend="PangoOTBuffer">PangoOTBuffer</link>*      <link linkend="pango-ot-buffer-new">pango_ot_buffer_new</link>                 (<link linkend="PangoFcFont">PangoFcFont</link> *font);
<link linkend="void">void</link>                <link linkend="pango-ot-buffer-destroy">pango_ot_buffer_destroy</link>             (<link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer);
<link linkend="void">void</link>                <link linkend="pango-ot-buffer-clear">pango_ot_buffer_clear</link>               (<link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer);
<link linkend="void">void</link>                <link linkend="pango-ot-buffer-add-glyph">pango_ot_buffer_add_glyph</link>           (<link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer,
                                                         <link linkend="guint">guint</link> glyph,
                                                         <link linkend="guint">guint</link> properties,
                                                         <link linkend="guint">guint</link> cluster);
<link linkend="void">void</link>                <link linkend="pango-ot-buffer-set-rtl">pango_ot_buffer_set_rtl</link>             (<link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer,
                                                         <link linkend="gboolean">gboolean</link> rtl);
<link linkend="void">void</link>                <link linkend="pango-ot-buffer-set-zero-width-marks">pango_ot_buffer_set_zero_width_marks</link>
                                                        (<link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer,
                                                         <link linkend="gboolean">gboolean</link> zero_width_marks);
<link linkend="void">void</link>                <link linkend="pango-ot-buffer-get-glyphs">pango_ot_buffer_get_glyphs</link>          (const <link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer,
                                                         <link linkend="PangoOTGlyph">PangoOTGlyph</link> **glyphs,
                                                         <link linkend="int">int</link> *n_glyphs);
<link linkend="void">void</link>                <link linkend="pango-ot-buffer-output">pango_ot_buffer_output</link>              (const <link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer,
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs);
const <link linkend="PangoOTRuleset">PangoOTRuleset</link>* <link linkend="pango-ot-ruleset-get-for-description">pango_ot_ruleset_get_for_description</link>
                                                        (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         const <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc);
<link linkend="PangoOTRuleset">PangoOTRuleset</link>*     <link linkend="pango-ot-ruleset-new">pango_ot_ruleset_new</link>                (<link linkend="PangoOTInfo">PangoOTInfo</link> *info);
<link linkend="PangoOTRuleset">PangoOTRuleset</link>*     <link linkend="pango-ot-ruleset-new-for">pango_ot_ruleset_new_for</link>            (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoScript">PangoScript</link> script,
                                                         <link linkend="PangoLanguage">PangoLanguage</link> *language);
<link linkend="PangoOTRuleset">PangoOTRuleset</link>*     <link linkend="pango-ot-ruleset-new-from-description">pango_ot_ruleset_new_from_description</link>
                                                        (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         const <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc);
<link linkend="void">void</link>                <link linkend="pango-ot-ruleset-add-feature">pango_ot_ruleset_add_feature</link>        (<link linkend="PangoOTRuleset">PangoOTRuleset</link> *ruleset,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="guint">guint</link> feature_index,
                                                         <link linkend="gulong">gulong</link> property_bit);
<link linkend="gboolean">gboolean</link>            <link linkend="pango-ot-ruleset-maybe-add-feature">pango_ot_ruleset_maybe_add_feature</link>  (<link linkend="PangoOTRuleset">PangoOTRuleset</link> *ruleset,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="PangoOTTag">PangoOTTag</link> feature_tag,
                                                         <link linkend="gulong">gulong</link> property_bit);
<link linkend="guint">guint</link>               <link linkend="pango-ot-ruleset-maybe-add-features">pango_ot_ruleset_maybe_add_features</link> (<link linkend="PangoOTRuleset">PangoOTRuleset</link> *ruleset,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         const <link linkend="PangoOTFeatureMap">PangoOTFeatureMap</link> *features,
                                                         <link linkend="guint">guint</link> n_features);
<link linkend="guint">guint</link>               <link linkend="pango-ot-ruleset-get-feature-count">pango_ot_ruleset_get_feature_count</link>  (const <link linkend="PangoOTRuleset">PangoOTRuleset</link> *ruleset,
                                                         <link linkend="guint">guint</link> *n_gsub_features,
                                                         <link linkend="guint">guint</link> *n_gpos_features);
<link linkend="void">void</link>                <link linkend="pango-ot-ruleset-substitute">pango_ot_ruleset_substitute</link>         (const <link linkend="PangoOTRuleset">PangoOTRuleset</link> *ruleset,
                                                         <link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer);
<link linkend="void">void</link>                <link linkend="pango-ot-ruleset-position">pango_ot_ruleset_position</link>           (const <link linkend="PangoOTRuleset">PangoOTRuleset</link> *ruleset,
                                                         <link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer);
<link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link>* <link linkend="pango-ot-ruleset-description-copy">pango_ot_ruleset_description_copy</link>
                                                        (const <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc);
<link linkend="gboolean">gboolean</link>            <link linkend="pango-ot-ruleset-description-equal">pango_ot_ruleset_description_equal</link>  (const <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc1,
                                                         const <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc2);
<link linkend="void">void</link>                <link linkend="pango-ot-ruleset-description-free">pango_ot_ruleset_description_free</link>   (<link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc);
<link linkend="guint">guint</link>               <link linkend="pango-ot-ruleset-description-hash">pango_ot_ruleset_description_hash</link>   (const <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc);
<link linkend="PangoOTTag">PangoOTTag</link>          <link linkend="pango-ot-tag-from-language">pango_ot_tag_from_language</link>          (<link linkend="PangoLanguage">PangoLanguage</link> *language);
<link linkend="PangoOTTag">PangoOTTag</link>          <link linkend="pango-ot-tag-from-script">pango_ot_tag_from_script</link>            (<link linkend="PangoScript">PangoScript</link> script);
<link linkend="PangoLanguage">PangoLanguage</link>*      <link linkend="pango-ot-tag-to-language">pango_ot_tag_to_language</link>            (<link linkend="PangoOTTag">PangoOTTag</link> language_tag);
<link linkend="PangoScript">PangoScript</link>         <link linkend="pango-ot-tag-to-script">pango_ot_tag_to_script</link>              (<link linkend="PangoOTTag">PangoOTTag</link> script_tag);
</synopsis>
</refsynopsisdiv>

<refsect1 role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----PangoOTInfo
</synopsis>
<synopsis>

  <link linkend="GObject">GObject</link>
   +----PangoOTRuleset
</synopsis>

</refsect1>








<refsect1 role="desc">
<title role="desc.title">Description</title>
<para>
Functions and macros in this section are used to implement the OpenType Layout
features and algorithms.  These are mostly useful when writing Fontconfig-based
shaping engines
</para>
</refsect1>

<refsect1 role="details">
<title role="details.title">Details</title>
<refsect2>
<title><anchor id="PangoOTTag" role="typedef"/>PangoOTTag</title>
<indexterm><primary>PangoOTTag</primary></indexterm><programlisting>typedef guint32 PangoOTTag;
</programlisting>
<para>
The <type>PangoOTTag</type> typedef is used to represent TrueType and OpenType
four letter tags inside Pango. Use <link linkend="PANGO-OT-TAG-MAKE:CAPS"><function>PANGO_OT_TAG_MAKE()</function></link>
or <link linkend="PANGO-OT-TAG-MAKE-FROM-STRING:CAPS"><function>PANGO_OT_TAG_MAKE_FROM_STRING()</function></link> macros to create <type>PangoOTTag</type>s manually.
</para></refsect2>
<refsect2>
<title><anchor id="PangoOTInfo-struct" role="struct"/>PangoOTInfo</title>
<indexterm><primary>PangoOTInfo</primary></indexterm><programlisting>typedef struct _PangoOTInfo PangoOTInfo;</programlisting>
<para>
The <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link> struct contains the various 
tables associated with an OpenType font. It contains only private fields and
should only be accessed via the <function>pango_ot_info_*</function> functions
which are documented below. To obtain a <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link>,
use <link linkend="pango-ot-info-new"><function>pango_ot_info_new()</function></link>.
</para></refsect2>
<refsect2>
<title><anchor id="PangoOTBuffer" role="struct"/>PangoOTBuffer</title>
<indexterm><primary>PangoOTBuffer</primary></indexterm><programlisting>typedef struct _PangoOTBuffer PangoOTBuffer;</programlisting>
<para>
The <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link> structure is used to store strings of glyphs associated
with a <link linkend="PangoFcFont"><type>PangoFcFont</type></link>, suitable for OpenType layout processing.  It contains
only private fields and should only be accessed via the
<function>pango_ot_buffer_*</function> functions which are documented below.
To obtain a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>, use <link linkend="pango-ot-buffer-new"><function>pango_ot_buffer_new()</function></link>.
</para></refsect2>
<refsect2>
<title><anchor id="PangoOTGlyph" role="struct"/>PangoOTGlyph</title>
<indexterm><primary>PangoOTGlyph</primary></indexterm><programlisting>typedef struct {
  guint    glyph;
  guint    properties;
  guint    cluster;
  gushort  component;
  gushort  ligID;
  gushort  property_cache;    /* Internal */
} PangoOTGlyph;
</programlisting>
<para>
The <link linkend="PangoOTGlyph"><type>PangoOTGlyph</type></link> structure represents a single glyph together with
information used for OpenType layout processing of the glyph.
It contains the following fields.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="guint">guint</link>&nbsp;<structfield>glyph</structfield>;</term>
<listitem><simpara>the glyph itself.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="guint">guint</link>&nbsp;<structfield>properties</structfield>;</term>
<listitem><simpara>the properties value, identifying which features should be
	     applied on this glyph.  See <link linkend="pango-ruleset-add-feature"><function>pango_ruleset_add_feature()</function></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="guint">guint</link>&nbsp;<structfield>cluster</structfield>;</term>
<listitem><simpara>the cluster that this glyph belongs to.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="gushort">gushort</link>&nbsp;<structfield>component</structfield>;</term>
<listitem><simpara>a component value, set by the OpenType layout engine.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="gushort">gushort</link>&nbsp;<structfield>ligID</structfield>;</term>
<listitem><simpara>a ligature index value, set by the OpenType layout engine.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="gushort">gushort</link>&nbsp;<structfield>property_cache</structfield>;</term>
<listitem><simpara>for internal use.

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoOTRuleset-struct" role="struct"/>PangoOTRuleset</title>
<indexterm><primary>PangoOTRuleset</primary></indexterm><programlisting>typedef struct _PangoOTRuleset PangoOTRuleset;</programlisting>
<para>
The <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link> structure holds a
set of features selected from the tables in an OpenType font.
(A feature is an operation such as adjusting glyph positioning
that should be applied to a text feature such as a certain
type of accent.) A <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link>
is created with <link linkend="pango-ot-ruleset-new"><function>pango_ot_ruleset_new()</function></link>, features are added
to it with <link linkend="pango-ot-ruleset-add-feature"><function>pango_ot_ruleset_add_feature()</function></link>, then it is
applied to a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link> with <link linkend="pango-ot-ruleset-shape"><function>pango_ot_ruleset_shape()</function></link>.
</para></refsect2>
<refsect2>
<title><anchor id="PangoOTRulesetDescription" role="struct" condition="since:1.18"/>PangoOTRulesetDescription</title>
<indexterm role="1.18"><primary>PangoOTRulesetDescription</primary></indexterm><programlisting>typedef struct {
  PangoScript               script;
  PangoLanguage            *language;
  const PangoOTFeatureMap  *static_gsub_features;
  guint                   n_static_gsub_features;
  const PangoOTFeatureMap  *static_gpos_features;
  guint                   n_static_gpos_features;
  const PangoOTFeatureMap  *other_features;
  guint                   n_other_features;
} PangoOTRulesetDescription;
</programlisting>
<para>
The <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link> structure holds all the information needed
to build a complete <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link> from an OpenType font.
The main use of this struct is to act as the key for a per-font
hash of rulesets.  The user populates a ruleset description and
gets the ruleset using <link linkend="pango-ot-ruleset-get-for-description"><function>pango_ot_ruleset_get_for_description()</function></link>
or create a new one using <link linkend="pango-ot-ruleset-new-from-description"><function>pango_ot_ruleset_new_from_description()</function></link>.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="PangoScript">PangoScript</link>&nbsp;<structfield>script</structfield>;</term>
<listitem><simpara>a <link linkend="PangoScript"><type>PangoScript</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="PangoLanguage">PangoLanguage</link>&nbsp;*<structfield>language</structfield>;</term>
<listitem><simpara>a <link linkend="PangoLanguage"><type>PangoLanguage</type></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term>const&nbsp;<link linkend="PangoOTFeatureMap">PangoOTFeatureMap</link>&nbsp;*<structfield>static_gsub_features</structfield>;</term>
<listitem><simpara>static map of GSUB features, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="guint">guint</link>&nbsp;<structfield>n_static_gsub_features</structfield>;</term>
<listitem><simpara>length of <parameter>static_gsub_features</parameter>, or 0.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term>const&nbsp;<link linkend="PangoOTFeatureMap">PangoOTFeatureMap</link>&nbsp;*<structfield>static_gpos_features</structfield>;</term>
<listitem><simpara>static map of GPOS features, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="guint">guint</link>&nbsp;<structfield>n_static_gpos_features</structfield>;</term>
<listitem><simpara>length of <parameter>static_gpos_features</parameter>, or 0.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term>const&nbsp;<link linkend="PangoOTFeatureMap">PangoOTFeatureMap</link>&nbsp;*<structfield>other_features</structfield>;</term>
<listitem><simpara>map of extra features to add to both GSUB and GPOS, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
                 Unlike the static maps, this pointer need not live beyond
		 the life of function calls taking this struct.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="guint">guint</link>&nbsp;<structfield>n_other_features</structfield>;</term>
<listitem><simpara>length of <parameter>other_features</parameter>, or 0.
</simpara></listitem>
</varlistentry>
</variablelist><para role="since">Since 1.18

</para></refsect2>
<refsect2>
<title><anchor id="PangoOTTableType" role="enum"/>enum PangoOTTableType</title>
<indexterm><primary>PangoOTTableType</primary></indexterm><programlisting>typedef enum
{
  PANGO_OT_TABLE_GSUB,
  PANGO_OT_TABLE_GPOS
} PangoOTTableType;
</programlisting>
<para>
The <type>PangoOTTableType</type> enumeration values are used to
identify the various OpenType tables in the
<function>pango_ot_info_*</function> functions.
</para><variablelist role="enum">
<varlistentry>
<term><anchor id="PANGO-OT-TABLE-GSUB:CAPS" role="constant"/><literal>PANGO_OT_TABLE_GSUB</literal></term>
<listitem><simpara>The GSUB table.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><anchor id="PANGO-OT-TABLE-GPOS:CAPS" role="constant"/><literal>PANGO_OT_TABLE_GPOS</literal></term>
<listitem><simpara>The GPOS table.

</simpara></listitem>
</varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PangoOTFeatureMap" role="struct" condition="since:1.18"/>PangoOTFeatureMap</title>
<indexterm role="1.18"><primary>PangoOTFeatureMap</primary></indexterm><programlisting>typedef struct {
  char     feature_name[5];
  gulong   property_bit;
} PangoOTFeatureMap;
</programlisting>
<para>
The <type>PangoOTFeatureMap</type> typedef is used to represent an OpenType
feature with the property bit associated with it.  The feature tag is
represented as a char array instead of a <link linkend="PangoOTTag"><type>PangoOTTag</type></link> for convenience.
</para><variablelist role="struct">
<varlistentry>
<term><link linkend="char">char</link>&nbsp;<structfield>feature_name</structfield>[5];</term>
<listitem><simpara>feature tag in represented as four-letter ASCII string.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><link linkend="gulong">gulong</link>&nbsp;<structfield>property_bit</structfield>;</term>
<listitem><simpara>the property bit to use for this feature.  See
	       <link linkend="pango-ot-ruleset-add-feature"><function>pango_ot_ruleset_add_feature()</function></link> for details.
</simpara></listitem>
</varlistentry>
</variablelist><para role="since">Since 1.18

</para></refsect2>
<refsect2>
<title><anchor id="PANGO-OT-TAG-MAKE:CAPS" role="macro"/>PANGO_OT_TAG_MAKE()</title>
<indexterm><primary>PANGO_OT_TAG_MAKE</primary></indexterm><programlisting>#define PANGO_OT_TAG_MAKE(c1,c2,c3,c4)		((PangoOTTag) FT_MAKE_TAG (c1, c2, c3, c4))
</programlisting>
<para>
Creates a <link linkend="PangoOTTag"><type>PangoOTTag</type></link> from four characters.  This is similar and
compatible with the <function><link linkend="FT-MAKE-TAG:CAPS"><function>FT_MAKE_TAG()</function></link></function> macro from
FreeType.
</para><variablelist role="params">
<varlistentry><term><parameter>c1</parameter>&nbsp;:</term>
<listitem><simpara>First character.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>c2</parameter>&nbsp;:</term>
<listitem><simpara>Second character.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>c3</parameter>&nbsp;:</term>
<listitem><simpara>Third character.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>c4</parameter>&nbsp;:</term>
<listitem><simpara>Fourth character.


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PANGO-OT-TAG-MAKE-FROM-STRING:CAPS" role="macro"/>PANGO_OT_TAG_MAKE_FROM_STRING()</title>
<indexterm><primary>PANGO_OT_TAG_MAKE_FROM_STRING</primary></indexterm><programlisting>#define             PANGO_OT_TAG_MAKE_FROM_STRING(s)</programlisting>
<para>
Creates a <link linkend="PangoOTTag"><type>PangoOTTag</type></link> from a string. The string should be at least
four characters long (pad with space characters if needed), and need
not be nul-terminated.  This is a convenience wrapper around
<link linkend="PANGO-OT-TAG-MAKE:CAPS"><function>PANGO_OT_TAG_MAKE()</function></link>, but cannot be used in certain situations, for
example, as a switch expression, as it dereferences pointers.
</para><variablelist role="params">
<varlistentry><term><parameter>s</parameter>&nbsp;:</term>
<listitem><simpara>The string representation of the tag.


</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="PANGO-OT-ALL-GLYPHS:CAPS" role="macro" condition="since:1.16"/>PANGO_OT_ALL_GLYPHS</title>
<indexterm role="1.16"><primary>PANGO_OT_ALL_GLYPHS</primary></indexterm><programlisting>#define PANGO_OT_ALL_GLYPHS			((guint) 0xFFFF)
</programlisting>
<para>
This is used as the property bit in <link linkend="pango-ot-ruleset-add-feature"><function>pango_ot_ruleset_add_feature()</function></link> when a
feature should be applied to all glyphs.
</para><para role="since">Since 1.16


</para></refsect2>
<refsect2>
<title><anchor id="PANGO-OT-NO-FEATURE:CAPS" role="macro" condition="since:1.18"/>PANGO_OT_NO_FEATURE</title>
<indexterm role="1.18"><primary>PANGO_OT_NO_FEATURE</primary></indexterm><programlisting>#define PANGO_OT_NO_FEATURE			((guint) 0xFFFF)
</programlisting>
<para>
This is used as a feature index that represent no feature, that is, should be
skipped.  It may be returned as feature index by <link linkend="pango-ot-info-find-feature"><function>pango_ot_info_find_feature()</function></link>
if the feature is not found, and <link linkend="pango-ot-rulset-add-feature"><function>pango_ot_rulset_add_feature()</function></link> function
automatically skips this value, so no special handling is required by the
user.
</para><para role="since">Since 1.18


</para></refsect2>
<refsect2>
<title><anchor id="PANGO-OT-NO-SCRIPT:CAPS" role="macro" condition="since:1.18"/>PANGO_OT_NO_SCRIPT</title>
<indexterm role="1.18"><primary>PANGO_OT_NO_SCRIPT</primary></indexterm><programlisting>#define PANGO_OT_NO_SCRIPT			((guint) 0xFFFF)
</programlisting>
<para>
This is used as a script index that represent no script, that is, when the
requested script was not found, and a default ('DFLT') script was not found
either.  It may be returned as script index by <link linkend="pango-ot-info-find-script"><function>pango_ot_info_find_script()</function></link>
if the script or a default script are not found, all other functions
taking a script index essentially return if the input script index is
this value, so no special handling is required by the user.
</para><para role="since">Since 1.18


</para></refsect2>
<refsect2>
<title><anchor id="PANGO-OT-DEFAULT-LANGUAGE:CAPS" role="macro" condition="since:1.16"/>PANGO_OT_DEFAULT_LANGUAGE</title>
<indexterm role="1.16"><primary>PANGO_OT_DEFAULT_LANGUAGE</primary></indexterm><programlisting>#define PANGO_OT_DEFAULT_LANGUAGE		((guint) 0xFFFF)
</programlisting>
<para>
This is used as the language index in <link linkend="pango-ot-info-find-feature"><function>pango_ot_info_find_feature()</function></link> when
the default language system of the script is desired.

It is also returned by <link linkend="pango-ot-info-find-language"><function>pango_ot_info_find_language()</function></link> if the requested language
is not found, or the requested language tag was PANGO_OT_TAG_DEFAULT_LANGUAGE.
The end result is that one can always call <link linkend="pango-ot-tag-from-language"><function>pango_ot_tag_from_language()</function></link>
followed by <link linkend="pango-ot-info-find-language"><function>pango_ot_info_find_language()</function></link> and pass the result to
<link linkend="pango-ot-info-find-feature"><function>pango_ot_info_find_feature()</function></link> without having to worry about falling back to
default language system explicitly.
</para><para role="since">Since 1.16


</para></refsect2>
<refsect2>
<title><anchor id="PANGO-OT-TAG-DEFAULT-LANGUAGE:CAPS" role="macro" condition="since:1.18"/>PANGO_OT_TAG_DEFAULT_LANGUAGE</title>
<indexterm role="1.18"><primary>PANGO_OT_TAG_DEFAULT_LANGUAGE</primary></indexterm><programlisting>#define PANGO_OT_TAG_DEFAULT_LANGUAGE		PANGO_OT_TAG_MAKE ('d', 'f', 'l', 't')
</programlisting>
<para>
This is a <link linkend="PangoOTTag"><type>PangoOTTag</type></link> representing a special language tag 'dflt'.  It is
returned as language tag by <link linkend="pango-ot-tag-from-language"><function>pango_ot_tag_from_language()</function></link> if the requested
language is not found.  It is safe to pass this value to
<link linkend="pango-ot-info-find-language"><function>pango_ot_info_find_language()</function></link> as that function falls back to returning default
language-system if the requested language tag is not found.
</para><para role="since">Since 1.18


</para></refsect2>
<refsect2>
<title><anchor id="PANGO-OT-TAG-DEFAULT-SCRIPT:CAPS" role="macro" condition="since:1.18"/>PANGO_OT_TAG_DEFAULT_SCRIPT</title>
<indexterm role="1.18"><primary>PANGO_OT_TAG_DEFAULT_SCRIPT</primary></indexterm><programlisting>#define PANGO_OT_TAG_DEFAULT_SCRIPT		PANGO_OT_TAG_MAKE ('D', 'F', 'L', 'T')
</programlisting>
<para>
This is a <link linkend="PangoOTTag"><type>PangoOTTag</type></link> representing the special script tag 'DFLT'.  It is
returned as script tag by <link linkend="pango-ot-tag-from-script"><function>pango_ot_tag_from_script()</function></link> if the requested script
is not found.
</para><para role="since">Since 1.18


</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-info-get" role="function" condition="since:1.2"/>pango_ot_info_get ()</title>
<indexterm role="1.2"><primary>pango_ot_info_get</primary></indexterm><programlisting><link linkend="PangoOTInfo">PangoOTInfo</link>*        pango_ot_info_get                   (<link linkend="FT-Face">FT_Face</link> face);</programlisting>
<para>
Returns the <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link> structure for the given FreeType font.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>face</parameter>&nbsp;:</term>
<listitem><simpara> a <type>FT_Face</type>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link> for <parameter>face</parameter>. This object will have
the same lifetime as <parameter>face</parameter>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.2
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-info-find-script" role="function"/>pango_ot_info_find_script ()</title>
<indexterm><primary>pango_ot_info_find_script</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_ot_info_find_script           (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="PangoOTTag">PangoOTTag</link> script_tag,
                                                         <link linkend="guint">guint</link> *script_index);</programlisting>
<para>
Finds the index of a script.  If not found, tries to find the 'DFLT'
and then 'dflt' scripts and return the index of that in <parameter>script_index</parameter>.
If none of those is found either, <link linkend="PANGO-OT-NO-SCRIPT:CAPS"><literal>PANGO_OT_NO_SCRIPT</literal></link> is placed in
<parameter>script_index</parameter>.
</para>
<para>
All other functions taking an input script_index parameter know
how to handle <link linkend="PANGO-OT-NO-SCRIPT:CAPS"><literal>PANGO_OT_NO_SCRIPT</literal></link>, so one can ignore the return
value of this function completely and proceed, to enjoy the automatic
fallback to the 'DFLT'/'dflt' script.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table_type</parameter>&nbsp;:</term>
<listitem><simpara> the table type to obtain information about.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>script_tag</parameter>&nbsp;:</term>
<listitem><simpara> the tag of the script to find.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>script_index</parameter>&nbsp;:</term>
<listitem><simpara> location to store the index of the script, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the script was found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-ot-info-find-language" role="function"/>pango_ot_info_find_language ()</title>
<indexterm><primary>pango_ot_info_find_language</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_ot_info_find_language         (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="guint">guint</link> script_index,
                                                         <link linkend="PangoOTTag">PangoOTTag</link> language_tag,
                                                         <link linkend="guint">guint</link> *language_index,
                                                         <link linkend="guint">guint</link> *required_feature_index);</programlisting>
<para>
Finds the index of a language and its required feature index.
If the language is not found, sets <parameter>language_index</parameter> to
PANGO_OT_DEFAULT_LANGUAGE and the required feature of the default language
system is returned in required_feature_index.  For best compatibility with
some fonts, also searches the language system tag 'dflt' before falling
back to the default language system, but that is transparent to the user.
The user can simply ignore the return value of this function to
automatically fall back to the default language system.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table_type</parameter>&nbsp;:</term>
<listitem><simpara> the table type to obtain information about.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>script_index</parameter>&nbsp;:</term>
<listitem><simpara> the index of the script whose languages are searched.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>language_tag</parameter>&nbsp;:</term>
<listitem><simpara> the tag of the language to find.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>language_index</parameter>&nbsp;:</term>
<listitem><simpara> location to store the index of the language, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>required_feature_index</parameter>&nbsp;:</term>
<listitem><simpara> location to store the required feature index of
   the language, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the language was found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-ot-info-find-feature" role="function"/>pango_ot_info_find_feature ()</title>
<indexterm><primary>pango_ot_info_find_feature</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_ot_info_find_feature          (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="PangoOTTag">PangoOTTag</link> feature_tag,
                                                         <link linkend="guint">guint</link> script_index,
                                                         <link linkend="guint">guint</link> language_index,
                                                         <link linkend="guint">guint</link> *feature_index);</programlisting>
<para>
Finds the index of a feature.  If the feature is not found, sets
<parameter>feature_index</parameter> to PANGO_OT_NO_FEATURE, which is safe to pass to
<link linkend="pango-ot-ruleset-add-feature"><function>pango_ot_ruleset_add_feature()</function></link> and similar functions.
</para>
<para>
In the future, this may set <parameter>feature_index</parameter> to an special value that if used
in <link linkend="pango-ot-ruleset-add-feature"><function>pango_ot_ruleset_add_feature()</function></link> will ask Pango to synthesize the
requested feature based on Unicode properties and data.  However, this
function will still return <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> in those cases.  So, users may want to
ignore the return value of this function in certain cases.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table_type</parameter>&nbsp;:</term>
<listitem><simpara> the table type to obtain information about.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>feature_tag</parameter>&nbsp;:</term>
<listitem><simpara> the tag of the feature to find.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>script_index</parameter>&nbsp;:</term>
<listitem><simpara> the index of the script.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>language_index</parameter>&nbsp;:</term>
<listitem><simpara> the index of the language whose features are searched,
    or <link linkend="PANGO-OT-DEFAULT-LANGUAGE:CAPS"><literal>PANGO_OT_DEFAULT_LANGUAGE</literal></link> to use the default language of the script.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>feature_index</parameter>&nbsp;:</term>
<listitem><simpara> location to store the index of the feature, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the feature was found.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-ot-info-list-scripts" role="function"/>pango_ot_info_list_scripts ()</title>
<indexterm><primary>pango_ot_info_list_scripts</primary></indexterm><programlisting><link linkend="PangoOTTag">PangoOTTag</link>*         pango_ot_info_list_scripts          (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type);</programlisting>
<para>
Obtains the list of available scripts.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table_type</parameter>&nbsp;:</term>
<listitem><simpara> the table type to obtain information about.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly-allocated zero-terminated array containing the tags of the
  available scripts.  Should be freed using <link linkend="g-free"><function>g_free()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-ot-info-list-languages" role="function"/>pango_ot_info_list_languages ()</title>
<indexterm><primary>pango_ot_info_list_languages</primary></indexterm><programlisting><link linkend="PangoOTTag">PangoOTTag</link>*         pango_ot_info_list_languages        (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="guint">guint</link> script_index,
                                                         <link linkend="PangoOTTag">PangoOTTag</link> language_tag);</programlisting>
<para>
Obtains the list of available languages for a given script.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table_type</parameter>&nbsp;:</term>
<listitem><simpara> the table type to obtain information about.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>script_index</parameter>&nbsp;:</term>
<listitem><simpara> the index of the script to list languages for.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>language_tag</parameter>&nbsp;:</term>
<listitem><simpara> unused parameter.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly-allocated zero-terminated array containing the tags of the
  available languages.  Should be freed using <link linkend="g-free"><function>g_free()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-ot-info-list-features" role="function"/>pango_ot_info_list_features ()</title>
<indexterm><primary>pango_ot_info_list_features</primary></indexterm><programlisting><link linkend="PangoOTTag">PangoOTTag</link>*         pango_ot_info_list_features         (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="PangoOTTag">PangoOTTag</link> tag,
                                                         <link linkend="guint">guint</link> script_index,
                                                         <link linkend="guint">guint</link> language_index);</programlisting>
<para>
Obtains the list of features for the given language of the given script.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table_type</parameter>&nbsp;:</term>
<listitem><simpara> the table type to obtain information about.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>tag</parameter>&nbsp;:</term>
<listitem><simpara> unused parameter.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>script_index</parameter>&nbsp;:</term>
<listitem><simpara> the index of the script to obtain information about.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>language_index</parameter>&nbsp;:</term>
<listitem><simpara> the index of the language to list features for, or
    <link linkend="PANGO-OT-DEFAULT-LANGUAGE:CAPS"><literal>PANGO_OT_DEFAULT_LANGUAGE</literal></link>, to list features for the default
    language of the script.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> a newly-allocated zero-terminated array containing the tags of the
available features.  Should be freed using <link linkend="g-free"><function>g_free()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-ot-buffer-new" role="function" condition="since:1.4"/>pango_ot_buffer_new ()</title>
<indexterm role="1.4"><primary>pango_ot_buffer_new</primary></indexterm><programlisting><link linkend="PangoOTBuffer">PangoOTBuffer</link>*      pango_ot_buffer_new                 (<link linkend="PangoFcFont">PangoFcFont</link> *font);</programlisting>
<para>
Creates a new <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link> for the given OpenType font.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>font</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoFcFont"><type>PangoFcFont</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>, which should
              be freed with <link linkend="pango-ot-buffer-destroy"><function>pango_ot_buffer_destroy()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-buffer-destroy" role="function" condition="since:1.4"/>pango_ot_buffer_destroy ()</title>
<indexterm role="1.4"><primary>pango_ot_buffer_destroy</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ot_buffer_destroy             (<link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer);</programlisting>
<para>
Destroys a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link> and free all associated memory.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>buffer</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-buffer-clear" role="function" condition="since:1.4"/>pango_ot_buffer_clear ()</title>
<indexterm role="1.4"><primary>pango_ot_buffer_clear</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ot_buffer_clear               (<link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer);</programlisting>
<para>
Empties a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>, make it ready to add glyphs to.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>buffer</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-buffer-add-glyph" role="function" condition="since:1.4"/>pango_ot_buffer_add_glyph ()</title>
<indexterm role="1.4"><primary>pango_ot_buffer_add_glyph</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ot_buffer_add_glyph           (<link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer,
                                                         <link linkend="guint">guint</link> glyph,
                                                         <link linkend="guint">guint</link> properties,
                                                         <link linkend="guint">guint</link> cluster);</programlisting>
<para>
Appends a glyph to a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>, with <parameter>properties</parameter> identifying which
features should be applied on this glyph.  See <link linkend="pango-ruleset-add-feature"><function>pango_ruleset_add_feature()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>buffer</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>glyph</parameter>&nbsp;:</term>
<listitem><simpara> the glyph index to add, like a <link linkend="PangoGlyph"><type>PangoGlyph</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>properties</parameter>&nbsp;:</term>
<listitem><simpara> the glyph properties
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>cluster</parameter>&nbsp;:</term>
<listitem><simpara> the cluster that this glyph belongs to
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-buffer-set-rtl" role="function" condition="since:1.4"/>pango_ot_buffer_set_rtl ()</title>
<indexterm role="1.4"><primary>pango_ot_buffer_set_rtl</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ot_buffer_set_rtl             (<link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer,
                                                         <link linkend="gboolean">gboolean</link> rtl);</programlisting>
<para>
Sets whether glyphs will be rendered right-to-left.  This setting
is needed for proper horizontal positioning of right-to-left scripts.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>buffer</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>rtl</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> for right-to-left text
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-buffer-set-zero-width-marks" role="function" condition="since:1.6"/>pango_ot_buffer_set_zero_width_marks ()</title>
<indexterm role="1.6"><primary>pango_ot_buffer_set_zero_width_marks</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ot_buffer_set_zero_width_marks
                                                        (<link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer,
                                                         <link linkend="gboolean">gboolean</link> zero_width_marks);</programlisting>
<para>
Sets whether characters with a mark class should be forced to zero width.
This setting is needed for proper positioning of Arabic accents,
but will produce incorrect results with standard OpenType Indic
fonts.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>buffer</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>zero_width_marks</parameter>&nbsp;:</term>
<listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if characters with a mark class should
 be forced to zero width.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.6
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-buffer-get-glyphs" role="function" condition="since:1.4"/>pango_ot_buffer_get_glyphs ()</title>
<indexterm role="1.4"><primary>pango_ot_buffer_get_glyphs</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ot_buffer_get_glyphs          (const <link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer,
                                                         <link linkend="PangoOTGlyph">PangoOTGlyph</link> **glyphs,
                                                         <link linkend="int">int</link> *n_glyphs);</programlisting>
<para>
Gets the glyph array contained in a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>.  The glyphs are
owned by the buffer and should not be freed, and are only valid as long
as buffer is not modified.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>buffer</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>glyphs</parameter>&nbsp;:</term>
<listitem><simpara> location to store the array of glyphs, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_glyphs</parameter>&nbsp;:</term>
<listitem><simpara> location to store the number of glyphs, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-buffer-output" role="function" condition="since:1.4"/>pango_ot_buffer_output ()</title>
<indexterm role="1.4"><primary>pango_ot_buffer_output</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ot_buffer_output              (const <link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer,
                                                         <link linkend="PangoGlyphString">PangoGlyphString</link> *glyphs);</programlisting>
<para>
Exports the glyphs in a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link> into a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>.  This is
typically used after the OpenType layout processing is over, to convert the
resulting glyphs into a generic Pango glyph string.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>buffer</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>glyphs</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoGlyphString"><type>PangoGlyphString</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-get-for-description" role="function" condition="since:1.18"/>pango_ot_ruleset_get_for_description ()</title>
<indexterm role="1.18"><primary>pango_ot_ruleset_get_for_description</primary></indexterm><programlisting>const <link linkend="PangoOTRuleset">PangoOTRuleset</link>* pango_ot_ruleset_get_for_description
                                                        (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         const <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc);</programlisting>
<para>
Returns a ruleset for the given OpenType info and ruleset
description.  Rulesets are created on demand using
<link linkend="pango-ot-ruleset-new-from-description"><function>pango_ot_ruleset_new_from_description()</function></link>.
The returned ruleset should not be modified or destroyed.
</para>
<para>
The static feature map members of <parameter>desc</parameter> should be alive as
long as <parameter>info</parameter> is.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>desc</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTRulesetDescription"><type>PangoOTRulesetDescription</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link> for <parameter>desc</parameter>. This object will have
the same lifetime as <parameter>info</parameter>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-new" role="function"/>pango_ot_ruleset_new ()</title>
<indexterm><primary>pango_ot_ruleset_new</primary></indexterm><programlisting><link linkend="PangoOTRuleset">PangoOTRuleset</link>*     pango_ot_ruleset_new                (<link linkend="PangoOTInfo">PangoOTInfo</link> *info);</programlisting>
<para>
Creates a new <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link> for the given OpenType info.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link>, which
              should be freed with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-new-for" role="function" condition="since:1.18"/>pango_ot_ruleset_new_for ()</title>
<indexterm role="1.18"><primary>pango_ot_ruleset_new_for</primary></indexterm><programlisting><link linkend="PangoOTRuleset">PangoOTRuleset</link>*     pango_ot_ruleset_new_for            (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         <link linkend="PangoScript">PangoScript</link> script,
                                                         <link linkend="PangoLanguage">PangoLanguage</link> *language);</programlisting>
<para>
Creates a new <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link> for the given OpenType info, script, and
language.
</para>
<para>
This function is part of a convenience scheme that highly simplifies
using a <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link> to represent features for a specific pair of script
and language.  So one can use this function passing in the script and
language of interest, and later try to add features to the ruleset by just
specifying the feature name or tag, without having to deal with finding
script, language, or feature indices manually.
</para>
<para>
In excess to what <link linkend="pango-ot-ruleset-new"><function>pango_ot_ruleset_new()</function></link> does, this function will:
<itemizedlist>
  <listitem>
  Find the <link linkend="PangoOTTag"><type>PangoOTTag</type></link> script and language tags associated with
  <parameter>script</parameter> and <parameter>language</parameter> using <link linkend="pango-ot-tag-from-script"><function>pango_ot_tag_from_script()</function></link> and
  <link linkend="pango-ot-tag-from-language"><function>pango_ot_tag_from_language()</function></link>,
  </listitem>
  <listitem>
  For each of table types <link linkend="PANGO-OT-TABLE-GSUB:CAPS"><literal>PANGO_OT_TABLE_GSUB</literal></link> and <link linkend="PANGO-OT-TABLE-GPOS:CAPS"><literal>PANGO_OT_TABLE_GPOS</literal></link>,
  find the script index of the script tag found and the language
  system index of the language tag found in that script system, using
  <link linkend="pango-ot-info-find-script"><function>pango_ot_info_find_script()</function></link> and <link linkend="pango-ot-info-find-language"><function>pango_ot_info_find_language()</function></link>,
  </listitem>
  <listitem>
  For found language-systems, if they have required feature
  index, add that feature to the ruleset using
  <link linkend="pango-ot-ruleset-add-feature"><function>pango_ot_ruleset_add_feature()</function></link>,
  </listitem>
  <listitem>
  Remember found script and language indices for both table types,
  and use them in future <link linkend="pango-ot-ruleset-maybe-add-feature"><function>pango_ot_ruleset_maybe_add_feature()</function></link> and
  <link linkend="pango-ot-ruleset-maybe-add-features"><function>pango_ot_ruleset_maybe_add_features()</function></link>.
  </listitem>
</itemizedlist>
</para>
<para>
Because of the way return values of <link linkend="pango-ot-info-find-script"><function>pango_ot_info_find_script()</function></link> and
<link linkend="pango-ot-info-find-language"><function>pango_ot_info_find_language()</function></link> are ignored, this function automatically
finds and uses the 'DFLT' script and the default language-system.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>script</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoScript"><type>PangoScript</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>language</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoLanguage"><type>PangoLanguage</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link>, which
              should be freed with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-new-from-description" role="function" condition="since:1.18"/>pango_ot_ruleset_new_from_description ()</title>
<indexterm role="1.18"><primary>pango_ot_ruleset_new_from_description</primary></indexterm><programlisting><link linkend="PangoOTRuleset">PangoOTRuleset</link>*     pango_ot_ruleset_new_from_description
                                                        (<link linkend="PangoOTInfo">PangoOTInfo</link> *info,
                                                         const <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc);</programlisting>
<para>
Creates a new <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link> for the given OpenType infor and
matching the given ruleset description.
</para>
<para>
This is a convenience function that calls <link linkend="pango-ot-ruleset-new-for"><function>pango_ot_ruleset_new_for()</function></link> and
adds the static GSUB/GPOS features to the resulting ruleset, followed by
adding other features to both GSUB and GPOS.
</para>
<para>
The static feature map members of <parameter>desc</parameter> should be alive as
long as <parameter>info</parameter> is.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>info</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTInfo"><type>PangoOTInfo</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>desc</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTRulesetDescription"><type>PangoOTRulesetDescription</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link>, which
              should be freed with <link linkend="g-object-unref"><function>g_object_unref()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-add-feature" role="function"/>pango_ot_ruleset_add_feature ()</title>
<indexterm><primary>pango_ot_ruleset_add_feature</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ot_ruleset_add_feature        (<link linkend="PangoOTRuleset">PangoOTRuleset</link> *ruleset,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="guint">guint</link> feature_index,
                                                         <link linkend="gulong">gulong</link> property_bit);</programlisting>
<para>
Adds a feature to the ruleset.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ruleset</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table_type</parameter>&nbsp;:</term>
<listitem><simpara> the table type to add a feature to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>feature_index</parameter>&nbsp;:</term>
<listitem><simpara> the index of the feature to add.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property_bit</parameter>&nbsp;:</term>
<listitem><simpara> the property bit to use for this feature. Used to identify
               the glyphs that this feature should be applied to, or
               <link linkend="PANGO-OT-ALL-GLYPHS:CAPS"><literal>PANGO_OT_ALL_GLYPHS</literal></link> if it should be applied to all glyphs.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-maybe-add-feature" role="function" condition="since:1.18"/>pango_ot_ruleset_maybe_add_feature ()</title>
<indexterm role="1.18"><primary>pango_ot_ruleset_maybe_add_feature</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_ot_ruleset_maybe_add_feature  (<link linkend="PangoOTRuleset">PangoOTRuleset</link> *ruleset,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         <link linkend="PangoOTTag">PangoOTTag</link> feature_tag,
                                                         <link linkend="gulong">gulong</link> property_bit);</programlisting>
<para>
This is a convenience function that first tries to find the feature
using <link linkend="pango-ot-info-find-feature"><function>pango_ot_info_find_feature()</function></link> and the ruleset script and language
passed to <link linkend="pango-ot-ruleset-new-for"><function>pango_ot_ruleset_new_for()</function></link>,
and if the feature is found, adds it to the ruleset.
</para>
<para>
If <parameter>ruleset</parameter> was not created using <link linkend="pango-ot-ruleset-new-for"><function>pango_ot_ruleset_new_for()</function></link>, this function
does nothing.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ruleset</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table_type</parameter>&nbsp;:</term>
<listitem><simpara> the table type to add a feature to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>feature_tag</parameter>&nbsp;:</term>
<listitem><simpara> the tag of the feature to add.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>property_bit</parameter>&nbsp;:</term>
<listitem><simpara> the property bit to use for this feature. Used to identify
               the glyphs that this feature should be applied to, or
               <link linkend="PANGO-OT-ALL-GLYPHS:CAPS"><literal>PANGO_OT_ALL_GLYPHS</literal></link> if it should be applied to all glyphs.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the feature was found and added to ruleset,
              <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-maybe-add-features" role="function" condition="since:1.18"/>pango_ot_ruleset_maybe_add_features ()</title>
<indexterm role="1.18"><primary>pango_ot_ruleset_maybe_add_features</primary></indexterm><programlisting><link linkend="guint">guint</link>               pango_ot_ruleset_maybe_add_features (<link linkend="PangoOTRuleset">PangoOTRuleset</link> *ruleset,
                                                         <link linkend="PangoOTTableType">PangoOTTableType</link> table_type,
                                                         const <link linkend="PangoOTFeatureMap">PangoOTFeatureMap</link> *features,
                                                         <link linkend="guint">guint</link> n_features);</programlisting>
<para>
This is a convenience function that 
for each feature in the feature map array <parameter>features</parameter>
converts the feature name to a <link linkend="PangoOTTag"><type>PangoOTTag</type></link> feature tag using <link linkend="FT-MAKE-TAG:CAPS"><function>FT_MAKE_TAG()</function></link>
and calls <link linkend="pango-ot-ruleset-maybe-add-feature"><function>pango_ot_ruleset_maybe_add_feature()</function></link> on it.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ruleset</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>table_type</parameter>&nbsp;:</term>
<listitem><simpara> the table type to add features to.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>features</parameter>&nbsp;:</term>
<listitem><simpara> array of feature name and property bits to add.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_features</parameter>&nbsp;:</term>
<listitem><simpara> number of feature records in <parameter>features</parameter> array.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> The number of features in <parameter>features</parameter> that were found
              and added to <parameter>ruleset</parameter>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-get-feature-count" role="function" condition="since:1.18"/>pango_ot_ruleset_get_feature_count ()</title>
<indexterm role="1.18"><primary>pango_ot_ruleset_get_feature_count</primary></indexterm><programlisting><link linkend="guint">guint</link>               pango_ot_ruleset_get_feature_count  (const <link linkend="PangoOTRuleset">PangoOTRuleset</link> *ruleset,
                                                         <link linkend="guint">guint</link> *n_gsub_features,
                                                         <link linkend="guint">guint</link> *n_gpos_features);</programlisting>
<para>
Gets the number of GSUB and GPOS features in the ruleset.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ruleset</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_gsub_features</parameter>&nbsp;:</term>
<listitem><simpara> location to store number of GSUB features, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>n_gpos_features</parameter>&nbsp;:</term>
<listitem><simpara> location to store number of GPOS features, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> Total number of features in the <parameter>ruleset</parameter>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-substitute" role="function" condition="since:1.4"/>pango_ot_ruleset_substitute ()</title>
<indexterm role="1.4"><primary>pango_ot_ruleset_substitute</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ot_ruleset_substitute         (const <link linkend="PangoOTRuleset">PangoOTRuleset</link> *ruleset,
                                                         <link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer);</programlisting>
<para>
Performs the OpenType GSUB substitution on <parameter>buffer</parameter> using the features
in <parameter>ruleset</parameter></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ruleset</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buffer</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-position" role="function" condition="since:1.4"/>pango_ot_ruleset_position ()</title>
<indexterm role="1.4"><primary>pango_ot_ruleset_position</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ot_ruleset_position           (const <link linkend="PangoOTRuleset">PangoOTRuleset</link> *ruleset,
                                                         <link linkend="PangoOTBuffer">PangoOTBuffer</link> *buffer);</programlisting>
<para>
Performs the OpenType GPOS positioning on <parameter>buffer</parameter> using the features
in <parameter>ruleset</parameter></para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>ruleset</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTRuleset"><type>PangoOTRuleset</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>buffer</parameter>&nbsp;:</term>
<listitem><simpara> a <link linkend="PangoOTBuffer"><type>PangoOTBuffer</type></link>.
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.4
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-description-copy" role="function" condition="since:1.18"/>pango_ot_ruleset_description_copy ()</title>
<indexterm role="1.18"><primary>pango_ot_ruleset_description_copy</primary></indexterm><programlisting><link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link>* pango_ot_ruleset_description_copy
                                                        (const <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc);</programlisting>
<para>
Creates a copy of <parameter>desc</parameter>, which should be freed with
<link linkend="pango-ot-ruleset-description-free"><function>pango_ot_ruleset_description_free()</function></link>. Primarily used internally
by <link linkend="pango-ot-ruleset-get-for-description"><function>pango_ot_ruleset_get_for_description()</function></link> to cache rulesets for
ruleset descriptions.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>desc</parameter>&nbsp;:</term>
<listitem><simpara> ruleset description to copy
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the newly allocated <link linkend="PangoOTRulesetDescription"><type>PangoOTRulesetDescription</type></link>, which
              should be freed with <link linkend="pango-ot-ruleset-description-free"><function>pango_ot_ruleset_description_free()</function></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-description-equal" role="function" condition="since:1.18"/>pango_ot_ruleset_description_equal ()</title>
<indexterm role="1.18"><primary>pango_ot_ruleset_description_equal</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            pango_ot_ruleset_description_equal  (const <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc1,
                                                         const <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc2);</programlisting>
<para>
Compares two ruleset descriptions for equality.
Two ruleset descriptions are considered equal if the rulesets
they describe are provably identical.  This means that their
script, language, and all feature sets should be equal.  For static feature
sets, the array addresses are compared directly, while for other
features, the list of features is compared one by one.
(Two ruleset descriptions may result in identical rulesets
being created, but still compare <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>.)</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>desc1</parameter>&nbsp;:</term>
<listitem><simpara> a ruleset description
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>desc2</parameter>&nbsp;:</term>
<listitem><simpara> a ruleset description
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if two ruleset descriptions are identical,
              <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> otherwise.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-description-free" role="function" condition="since:1.18"/>pango_ot_ruleset_description_free ()</title>
<indexterm role="1.18"><primary>pango_ot_ruleset_description_free</primary></indexterm><programlisting><link linkend="void">void</link>                pango_ot_ruleset_description_free   (<link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc);</programlisting>
<para>
Frees a ruleset description allocated by 
<link linkend="pango-ot-ruleset-description-copy"><function>pango_ot_ruleset_description_copy()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>desc</parameter>&nbsp;:</term>
<listitem><simpara> an allocated <link linkend="PangoOTRulesetDescription"><type>PangoOTRulesetDescription</type></link>
</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-ruleset-description-hash" role="function" condition="since:1.18"/>pango_ot_ruleset_description_hash ()</title>
<indexterm role="1.18"><primary>pango_ot_ruleset_description_hash</primary></indexterm><programlisting><link linkend="guint">guint</link>               pango_ot_ruleset_description_hash   (const <link linkend="PangoOTRulesetDescription">PangoOTRulesetDescription</link> *desc);</programlisting>
<para>
Computes a hash of a <link linkend="PangoOTRulesetDescription"><type>PangoOTRulesetDescription</type></link> structure suitable
to be used, for example, as an argument to <link linkend="g-hash-table-new"><function>g_hash_table_new()</function></link>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>desc</parameter>&nbsp;:</term>
<listitem><simpara> a ruleset description
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> the hash value.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-tag-from-language" role="function" condition="since:1.18"/>pango_ot_tag_from_language ()</title>
<indexterm role="1.18"><primary>pango_ot_tag_from_language</primary></indexterm><programlisting><link linkend="PangoOTTag">PangoOTTag</link>          pango_ot_tag_from_language          (<link linkend="PangoLanguage">PangoLanguage</link> *language);</programlisting>
<para>
Finds the OpenType language-system tag best describing <parameter>language</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>language</parameter>&nbsp;:</term>
<listitem><simpara> A <link linkend="PangoLanguage"><type>PangoLanguage</type></link>, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="PangoOTTag"><type>PangoOTTag</type></link> best matching <parameter>language</parameter> or
<link linkend="PANGO-OT-TAG-DEFAULT-LANGUAGE:CAPS"><literal>PANGO_OT_TAG_DEFAULT_LANGUAGE</literal></link> if none found or if <parameter>language</parameter>
is <link linkend="NULL:CAPS"><literal>NULL</literal></link>.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-tag-from-script" role="function" condition="since:1.18"/>pango_ot_tag_from_script ()</title>
<indexterm role="1.18"><primary>pango_ot_tag_from_script</primary></indexterm><programlisting><link linkend="PangoOTTag">PangoOTTag</link>          pango_ot_tag_from_script            (<link linkend="PangoScript">PangoScript</link> script);</programlisting>
<para>
Finds the OpenType script tag corresponding to <parameter>script</parameter>.
</para>
<para>
The <link linkend="PANGO-SCRIPT-COMMON:CAPS"><literal>PANGO_SCRIPT_COMMON</literal></link>, <link linkend="PANGO-SCRIPT-INHERITED:CAPS"><literal>PANGO_SCRIPT_INHERITED</literal></link>, and
<link linkend="PANGO-SCRIPT-UNKNOWN:CAPS"><literal>PANGO_SCRIPT_UNKNOWN</literal></link> scripts are mapped to the OpenType
'DFLT' script tag that is also defined as
<link linkend="PANGO-OT-TAG-DEFAULT-SCRIPT:CAPS"><literal>PANGO_OT_TAG_DEFAULT_SCRIPT</literal></link>.
</para>
<para>
Note that multiple <link linkend="PangoScript"><type>PangoScript</type></link> values may map to the same
OpenType script tag.  In particular, <link linkend="PANGO-SCRIPT-HIRAGANA:CAPS"><literal>PANGO_SCRIPT_HIRAGANA</literal></link>
and <link linkend="PANGO-SCRIPT-KATAKANA:CAPS"><literal>PANGO_SCRIPT_KATAKANA</literal></link> both map to the OT tag 'kana'.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>script</parameter>&nbsp;:</term>
<listitem><simpara> A <link linkend="PangoScript"><type>PangoScript</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="PangoOTTag"><type>PangoOTTag</type></link> corresponding to <parameter>script</parameter> or
<link linkend="PANGO-OT-TAG-DEFAULT-SCRIPT:CAPS"><literal>PANGO_OT_TAG_DEFAULT_SCRIPT</literal></link> if none found.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-tag-to-language" role="function" condition="since:1.18"/>pango_ot_tag_to_language ()</title>
<indexterm role="1.18"><primary>pango_ot_tag_to_language</primary></indexterm><programlisting><link linkend="PangoLanguage">PangoLanguage</link>*      pango_ot_tag_to_language            (<link linkend="PangoOTTag">PangoOTTag</link> language_tag);</programlisting>
<para>
Finds a <link linkend="PangoLanguage"><type>PangoLanguage</type></link> corresponding to <parameter>language_tag</parameter>.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>language_tag</parameter>&nbsp;:</term>
<listitem><simpara> A <link linkend="PangoOTTag"><type>PangoOTTag</type></link> OpenType language-system tag
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="PangoLanguage"><type>PangoLanguage</type></link> best matching <parameter>language_tag</parameter> or
<link linkend="PangoLanguage"><type>PangoLanguage</type></link> corresponding to the string "xx" if none found.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>
<refsect2>
<title><anchor id="pango-ot-tag-to-script" role="function" condition="since:1.18"/>pango_ot_tag_to_script ()</title>
<indexterm role="1.18"><primary>pango_ot_tag_to_script</primary></indexterm><programlisting><link linkend="PangoScript">PangoScript</link>         pango_ot_tag_to_script              (<link linkend="PangoOTTag">PangoOTTag</link> script_tag);</programlisting>
<para>
Finds the <link linkend="PangoScript"><type>PangoScript</type></link> corresponding to <parameter>script_tag</parameter>.
</para>
<para>
The 'DFLT' script tag is mapped to <link linkend="PANGO-SCRIPT-COMMON:CAPS"><literal>PANGO_SCRIPT_COMMON</literal></link>.
</para>
<para>
Note that an OpenType script tag may correspond to multiple
<link linkend="PangoScript"><type>PangoScript</type></link> values.  In such cases, the <link linkend="PangoScript"><type>PangoScript</type></link> value
with the smallest value is returned.
In particular, <link linkend="PANGO-SCRIPT-HIRAGANA:CAPS"><literal>PANGO_SCRIPT_HIRAGANA</literal></link>
and <link linkend="PANGO-SCRIPT-KATAKANA:CAPS"><literal>PANGO_SCRIPT_KATAKANA</literal></link> both map to the OT tag 'kana'.
This function will return <link linkend="PANGO-SCRIPT-HIRAGANA:CAPS"><literal>PANGO_SCRIPT_HIRAGANA</literal></link> for
'kana'.</para>
<para>

</para><variablelist role="params">
<varlistentry><term><parameter>script_tag</parameter>&nbsp;:</term>
<listitem><simpara> A <link linkend="PangoOTTag"><type>PangoOTTag</type></link> OpenType script tag
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&nbsp;:</term><listitem><simpara> <link linkend="PangoScript"><type>PangoScript</type></link> corresponding to <parameter>script_tag</parameter> or
<link linkend="PANGO-SCRIPT-UNKNOWN:CAPS"><literal>PANGO_SCRIPT_UNKNOWN</literal></link> if none found.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since  1.18
</para></refsect2>

</refsect1>




</refentry>
