## PangoFcDecoder PangoFcDecoder — Custom font encoding handling |

## Synopsis

                        PangoFcDecoder;
                        PangoFcDecoderClass;
    FcCharSet*          pango_fc_decoder_get_charset        (PangoFcDecoder *decoder,
                                                             PangoFcFont *fcfont);
    PangoGlyph          pango_fc_decoder_get_glyph          (PangoFcDecoder *decoder,
                                                             PangoFcFont *fcfont,
                                                             guint32 wc);

## Object Hierarchy

      GObject
       +----PangoFcDecoder

## Description

PangoFcDecoder represents a decoder that an application provides for handling a font that is encoded in a custom way.

## Details

### PangoFcDecoder

    typedef struct _PangoFcDecoder PangoFcDecoder;

PangoFcDecoder 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 `pango_fc_font_map_add_decoder_find_func()`. 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 get_charset and get_glyph callbacks into your object implementation.

Since 1.6

### PangoFcDecoderClass

    typedef struct {
      FcCharSet  *(*get_charset) (PangoFcDecoder *decoder,
    			      PangoFcFont    *fcfont);
      PangoGlyph  (*get_glyph)   (PangoFcDecoder *decoder,
    			      PangoFcFont    *fcfont,
    			      guint32         wc);
    } PangoFcDecoderClass;

Class structure for PangoFcDecoder.

`get_charset` () | This returns an FcCharset given a PangoFcFont that includes a list of supported characters in the font. The FcCharSet 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.
`get_glyph` () | This returns a single PangoGlyph for a given Unicode code point.

Since 1.6

### pango_fc_decoder_get_charset ()

    FcCharSet*          pango_fc_decoder_get_charset        (PangoFcDecoder *decoder,
                                                             PangoFcFont *fcfont);

Generates an FcCharSet of supported characters for the fcfont given. The returned FcCharSet will be a reference to an internal value stored by the PangoFcDecoder and must not be modified or freed.

`decoder` : | a PangoFcDecoder
`fcfont` : | the PangoFcFont to query.
Returns : | the FcCharset for `fcfont`; must not be modified or freed.

Since 1.6

### pango_fc_decoder_get_glyph ()

    PangoGlyph          pango_fc_decoder_get_glyph          (PangoFcDecoder *decoder,
                                                             PangoFcFont *fcfont,
                                                             guint32 wc);

Generates a PangoGlyph 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.)

`decoder` : | a PangoFcDecoder
`fcfont` : | a PangoFcFont to query.
`wc` : | the Unicode code point to convert to a single PangoGlyph.
Returns : | the glyph index, or 0 if the glyph isn't covered by the font.

Since 1.6