<refentry id="PangoFcDecoder">
<refmeta>
<refentrytitle role="top_of_page" id="PangoFcDecoder.top_of_page">PangoFcDecoder</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>PANGO Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>PangoFcDecoder</refname>
<refpurpose>Custom font encoding handling</refpurpose>
</refnamediv>

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

<synopsis>
                    <link linkend="PangoFcDecoder-struct">PangoFcDecoder</link>;
                    <link linkend="PangoFcDecoderClass">PangoFcDecoderClass</link>;
<link linkend="FcCharSet">FcCharSet</link> *         <link linkend="pango-fc-decoder-get-charset">pango_fc_decoder_get_charset</link>        (<link linkend="PangoFcDecoder">PangoFcDecoder</link> *decoder,
                                                         <link linkend="PangoFcFont">PangoFcFont</link> *fcfont);
<link linkend="PangoGlyph">PangoGlyph</link>          <link linkend="pango-fc-decoder-get-glyph">pango_fc_decoder_get_glyph</link>          (<link linkend="PangoFcDecoder">PangoFcDecoder</link> *decoder,
                                                         <link linkend="PangoFcFont">PangoFcFont</link> *fcfont,
                                                         <link linkend="guint32">guint32</link> wc);
</synopsis>
</refsynopsisdiv>

<refsect1 id="PangoFcDecoder.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----PangoFcDecoder
</synopsis>
</refsect1>








<refsect1 id="PangoFcDecoder.description" role="desc">
<title role="desc.title">Description</title>
<para>
PangoFcDecoder represents a decoder that an application provides
for handling a font that is encoded in a custom way.
</para>
</refsect1>

<refsect1 id="PangoFcDecoder.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="PangoFcDecoder-struct" role="struct">
<title>PangoFcDecoder</title>
<indexterm zone="PangoFcDecoder-struct" role="1.6"><primary sortas="PangoFcDecoder">PangoFcDecoder</primary></indexterm><programlisting>typedef struct _PangoFcDecoder PangoFcDecoder;</programlisting>
<para>
<link linkend="PangoFcDecoder"><type>PangoFcDecoder</type></link> is a virtual base class that implementations will
inherit from.  It's the interface that is used to define a custom
encoding for a font.  These objects are created in your code from a
function callback that was originally registered with
<link linkend="pango-fc-font-map-add-decoder-find-func"><function>pango_fc_font_map_add_decoder_find_func()</function></link>.  Pango requires
information about the supported charset for a font as well as the
individual character to glyph conversions.  Pango gets that
information via the <link linkend="get-charset"><type>get_charset</type></link> and <link linkend="get-glyph"><type>get_glyph</type></link> callbacks into your
object implementation.</para>
<para>
</para><para role="since">Since 1.6</para></refsect2>
<refsect2 id="PangoFcDecoderClass" role="struct" condition="since:1.6">
<title>PangoFcDecoderClass</title>
<indexterm zone="PangoFcDecoderClass" role="1.6"><primary sortas="PangoFcDecoderClass">PangoFcDecoderClass</primary></indexterm><programlisting>typedef struct {
  FcCharSet  *(*get_charset) (PangoFcDecoder *decoder,
			      PangoFcFont    *fcfont);
  PangoGlyph  (*get_glyph)   (PangoFcDecoder *decoder,
			      PangoFcFont    *fcfont,
			      guint32         wc);
} PangoFcDecoderClass;
</programlisting>
<para>
Class structure for <link linkend="PangoFcDecoder"><type>PangoFcDecoder</type></link>.</para>
<para>
</para><variablelist role="struct">
<varlistentry>
<term><structfield>get_charset</structfield>&#160;()</term>
<listitem><simpara> This returns an <link linkend="FcCharset"><type>FcCharset</type></link> given a <link linkend="PangoFcFont"><type>PangoFcFont</type></link> that
 includes a list of supported characters in the font.  The
 <link linkend="FcCharSet"><type>FcCharSet</type></link> that is returned should be an internal reference to your
 code.  Pango will not free this structure.  It is important that
 you make this callback fast because this callback is called
 separately for each character to determine Unicode coverage.
</simpara></listitem>
</varlistentry>
<varlistentry>
<term><structfield>get_glyph</structfield>&#160;()</term>
<listitem><simpara> This returns a single <link linkend="PangoGlyph"><type>PangoGlyph</type></link> for a given Unicode
 code point.
</simpara></listitem>
</varlistentry>
</variablelist><para role="since">Since 1.6</para></refsect2>
<refsect2 id="pango-fc-decoder-get-charset" role="function" condition="since:1.6">
<title>pango_fc_decoder_get_charset ()</title>
<indexterm zone="pango-fc-decoder-get-charset" role="1.6"><primary sortas="pango_fc_decoder_get_charset">pango_fc_decoder_get_charset</primary></indexterm><programlisting><link linkend="FcCharSet">FcCharSet</link> *         pango_fc_decoder_get_charset        (<link linkend="PangoFcDecoder">PangoFcDecoder</link> *decoder,
                                                         <link linkend="PangoFcFont">PangoFcFont</link> *fcfont);</programlisting>
<para>
Generates an <link linkend="FcCharSet"><type>FcCharSet</type></link> of supported characters for the fcfont
given.  The returned <link linkend="FcCharSet"><type>FcCharSet</type></link> will be a reference to an
internal value stored by the <link linkend="PangoFcDecoder"><type>PangoFcDecoder</type></link> and must not
be modified or freed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>decoder</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoFcDecoder"><type>PangoFcDecoder</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fcfont</parameter>&#160;:</term>
<listitem><simpara> the <link linkend="PangoFcFont"><type>PangoFcFont</type></link> to query.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="FcCharset"><type>FcCharset</type></link> for <parameter>fcfont</parameter>; must not be modified
  or freed.

</simpara></listitem></varlistentry>
</variablelist><para role="since">Since 1.6</para></refsect2>
<refsect2 id="pango-fc-decoder-get-glyph" role="function" condition="since:1.6">
<title>pango_fc_decoder_get_glyph ()</title>
<indexterm zone="pango-fc-decoder-get-glyph" role="1.6"><primary sortas="pango_fc_decoder_get_glyph">pango_fc_decoder_get_glyph</primary></indexterm><programlisting><link linkend="PangoGlyph">PangoGlyph</link>          pango_fc_decoder_get_glyph          (<link linkend="PangoFcDecoder">PangoFcDecoder</link> *decoder,
                                                         <link linkend="PangoFcFont">PangoFcFont</link> *fcfont,
                                                         <link linkend="guint32">guint32</link> wc);</programlisting>
<para>
Generates a <link linkend="PangoGlyph"><type>PangoGlyph</type></link> for the given Unicode point using the
custom decoder. For complex scripts where there can be multiple
glyphs for a single character, the decoder will return whatever
glyph is most convenient for it. (Usually whatever glyph is directly
in the fonts character map table.)</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>decoder</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoFcDecoder"><type>PangoFcDecoder</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>fcfont</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="PangoFcFont"><type>PangoFcFont</type></link> to query.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>wc</parameter>&#160;:</term>
<listitem><simpara> the Unicode code point to convert to a single <link linkend="PangoGlyph"><type>PangoGlyph</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the glyph index, or 0 if the glyph isn't
covered by the font.

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

</refsect1>




</refentry>
