2 * pangofc-decoder.c: Custom font encoder/decoders
4 * Copyright (C) 2004 Red Hat Software
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
23 #include "pangofc-decoder.h"
25 G_DEFINE_ABSTRACT_TYPE (PangoFcDecoder, pango_fc_decoder, G_TYPE_OBJECT)
28 pango_fc_decoder_init (PangoFcDecoder *decoder G_GNUC_UNUSED)
33 pango_fc_decoder_class_init (PangoFcDecoderClass *klass G_GNUC_UNUSED)
38 * pango_fc_decoder_get_charset:
39 * @decoder: a #PangoFcDecoder
40 * @fcfont: the #PangoFcFont to query.
42 * Generates an #FcCharSet of supported characters for the fcfont
43 * given. The returned #FcCharSet will be a reference to an
44 * internal value stored by the #PangoFcDecoder and must not
45 * be modified or freed.
47 * Return value: the #FcCharset for @fcfont; must not be modified
53 pango_fc_decoder_get_charset (PangoFcDecoder *decoder,
56 g_return_val_if_fail (PANGO_IS_FC_DECODER (decoder), NULL);
58 return PANGO_FC_DECODER_GET_CLASS (decoder)->get_charset (decoder, fcfont);
62 * pango_fc_decoder_get_glyph:
63 * @decoder: a #PangoFcDecoder
64 * @fcfont: a #PangoFcFont to query.
65 * @wc: the Unicode code point to convert to a single #PangoGlyph.
67 * Generates a #PangoGlyph for the given Unicode point using the
68 * custom decoder. For complex scripts where there can be multiple
69 * glyphs for a single character, the decoder will return whatever
70 * glyph is most convenient for it. (Usually whatever glyph is directly
71 * in the fonts character map table.)
73 * Return value: the glyph index, or 0 if the glyph isn't
74 * covered by the font.
79 pango_fc_decoder_get_glyph (PangoFcDecoder *decoder,
83 g_return_val_if_fail (PANGO_IS_FC_DECODER (decoder), 0);
85 return PANGO_FC_DECODER_GET_CLASS (decoder)->get_glyph (decoder, fcfont, wc);