<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
  "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
]>
<refentry id="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>

<refsect1 id="PangoFcDecoder.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_return" colwidth="150px"/>
<colspec colname="functions_name"/>
<tbody>
<row><entry role="function_type"><link linkend="FcCharSet"><returnvalue>FcCharSet</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="pango-fc-decoder-get-charset">pango_fc_decoder_get_charset</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="PangoGlyph"><returnvalue>PangoGlyph</returnvalue></link>
</entry><entry role="function_name"><link linkend="pango-fc-decoder-get-glyph">pango_fc_decoder_get_glyph</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="PangoFcDecoder.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="name" colwidth="150px"/>
<colspec colname="description"/>
<tbody>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="PangoFcDecoder-struct">PangoFcDecoder</link></entry></row>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="PangoFcDecoderClass">PangoFcDecoderClass</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="PangoFcDecoder.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> PangoFcDecoder
</screen>
</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.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="pango-fc-decoder-get-charset" role="function" condition="since:1.6">
<title>pango_fc_decoder_get_charset&#160;()</title>
<indexterm zone="pango-fc-decoder-get-charset" role="1.6"><primary>pango_fc_decoder_get_charset</primary></indexterm>
<programlisting language="C"><link linkend="FcCharSet"><returnvalue>FcCharSet</returnvalue></link>&#160;*
pango_fc_decoder_get_charset (<parameter><link linkend="PangoFcDecoder"><type>PangoFcDecoder</type></link> *decoder</parameter>,
                              <parameter><link linkend="PangoFcFont"><type>PangoFcFont</type></link> *fcfont</parameter>);</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>
<refsect3 id="pango-fc-decoder-get-charset.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>decoder</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoFcDecoder"><type>PangoFcDecoder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>fcfont</para></entry>
<entry role="parameter_description"><para>the <link linkend="PangoFcFont"><type>PangoFcFont</type></link> to query.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-fc-decoder-get-charset.returns" role="returns">
<title>Returns</title>
<para>the <link linkend="FcCharset"><type>FcCharset</type></link> for <parameter>fcfont</parameter>
; must not
be modified or freed. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3><para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="pango-fc-decoder-get-glyph" role="function" condition="since:1.6">
<title>pango_fc_decoder_get_glyph&#160;()</title>
<indexterm zone="pango-fc-decoder-get-glyph" role="1.6"><primary>pango_fc_decoder_get_glyph</primary></indexterm>
<programlisting language="C"><link linkend="PangoGlyph"><returnvalue>PangoGlyph</returnvalue></link>
pango_fc_decoder_get_glyph (<parameter><link linkend="PangoFcDecoder"><type>PangoFcDecoder</type></link> *decoder</parameter>,
                            <parameter><link linkend="PangoFcFont"><type>PangoFcFont</type></link> *fcfont</parameter>,
                            <parameter><link linkend="guint32"><type>guint32</type></link> wc</parameter>);</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>
<refsect3 id="pango-fc-decoder-get-glyph.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>decoder</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoFcDecoder"><type>PangoFcDecoder</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>fcfont</para></entry>
<entry role="parameter_description"><para>a <link linkend="PangoFcFont"><type>PangoFcFont</type></link> to query.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>wc</para></entry>
<entry role="parameter_description"><para>the Unicode code point to convert to a single <link linkend="PangoGlyph"><type>PangoGlyph</type></link>.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="pango-fc-decoder-get-glyph.returns" role="returns">
<title>Returns</title>
<para> the glyph index, or 0 if the glyph isn't
covered by the font.</para>
</refsect3><para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>

</refsect1>
<refsect1 id="PangoFcDecoder.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="PangoFcDecoder-struct" role="struct">
<title>struct PangoFcDecoder</title>
<indexterm zone="PangoFcDecoder-struct" role="1.6"><primary>PangoFcDecoder</primary></indexterm>
<programlisting language="C">struct 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 role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>
<refsect2 id="PangoFcDecoderClass" role="struct" condition="since:1.6">
<title>struct PangoFcDecoderClass</title>
<indexterm zone="PangoFcDecoderClass" role="1.6"><primary>PangoFcDecoderClass</primary></indexterm>
<programlisting language="C">struct PangoFcDecoderClass {
  FcCharSet  *(*get_charset) (PangoFcDecoder *decoder,
			      PangoFcFont    *fcfont);
  PangoGlyph  (*get_glyph)   (PangoFcDecoder *decoder,
			      PangoFcFont    *fcfont,
			      guint32         wc);
};
</programlisting>
<para>Class structure for <link linkend="PangoFcDecoder"><type>PangoFcDecoder</type></link>.</para>
<refsect3 id="PangoFcDecoderClass.members" role="struct_members">
<title>Members</title>
<informaltable role="struct_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="struct_members_name" colwidth="300px"/>
<colspec colname="struct_members_description"/>
<colspec colname="struct_members_annotations" colwidth="200px"/>
<tbody>
<row role="member"><entry role="struct_member_name"><para><structfield id="PangoFcDecoderClass.get-charset">get_charset</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>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.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
<row role="member"><entry role="struct_member_name"><para><structfield id="PangoFcDecoderClass.get-glyph">get_glyph</structfield>&#160;()</para></entry>
<entry role="struct_member_description"><para>This returns a single <link linkend="PangoGlyph"><type>PangoGlyph</type></link> for a given Unicode
code point.</para></entry>
<entry role="struct_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3>
<para role="since">Since: <link linkend="api-index-1.6">1.6</link></para></refsect2>

</refsect1>

</refentry>
