1 | /* Pango |
2 | * pangofc-font.h: Base fontmap type for fontconfig-based backends |
3 | * |
4 | * Copyright (C) 2003 Red Hat Software |
5 | * |
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. |
10 | * |
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. |
15 | * |
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. |
20 | */ |
21 | |
22 | #ifndef __PANGO_FC_FONT_PRIVATE_H__ |
23 | #define __PANGO_FC_FONT_PRIVATE_H__ |
24 | |
25 | #include <pango/pangofc-font.h> |
26 | #include <pango/pango-font-private.h> |
27 | |
28 | G_BEGIN_DECLS |
29 | |
30 | /** |
31 | * PANGO_RENDER_TYPE_FC: |
32 | * |
33 | * A string constant used to identify shape engines that work |
34 | * with the fontconfig based backends. See the @engine_type field |
35 | * of `PangoEngineInfo`. |
36 | **/ |
37 | #define PANGO_RENDER_TYPE_FC "PangoRenderFc" |
38 | |
39 | #define PANGO_FC_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PANGO_TYPE_FC_FONT, PangoFcFontClass)) |
40 | #define PANGO_IS_FC_FONT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PANGO_TYPE_FC_FONT)) |
41 | #define PANGO_FC_FONT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PANGO_TYPE_FC_FONT, PangoFcFontClass)) |
42 | |
43 | /** |
44 | * PangoFcFontClass: |
45 | * @lock_face: Returns the FT_Face of the font and increases |
46 | * the reference count for the face by one. |
47 | * @unlock_face: Decreases the reference count for the |
48 | * FT_Face of the font by one. When the count is zero, |
49 | * the `PangoFcFont` subclass is allowed to free the |
50 | * FT_Face. |
51 | * @has_char: Return %TRUE if the the font contains a glyph |
52 | * corresponding to the specified character. |
53 | * @get_glyph: Gets the glyph that corresponds to the given |
54 | * Unicode character. |
55 | * @get_unknown_glyph: (nullable): Gets the glyph that |
56 | * should be used to display an unknown-glyph indication |
57 | * for the specified Unicode character. May be %NULL. |
58 | * @shutdown: (nullable): Performs any font-specific |
59 | * shutdown code that needs to be done when |
60 | * pango_fc_font_map_shutdown is called. May be %NULL. |
61 | * |
62 | * Class structure for `PangoFcFont`. |
63 | **/ |
64 | struct _PangoFcFontClass |
65 | { |
66 | /*< private >*/ |
67 | PangoFontClass parent_class; |
68 | |
69 | /*< public >*/ |
70 | FT_Face (*lock_face) (PangoFcFont *font); |
71 | void (*unlock_face) (PangoFcFont *font); |
72 | gboolean (*has_char) (PangoFcFont *font, |
73 | gunichar wc); |
74 | guint (*get_glyph) (PangoFcFont *font, |
75 | gunichar wc); |
76 | PangoGlyph (*get_unknown_glyph) (PangoFcFont *font, |
77 | gunichar wc); |
78 | void (*shutdown) (PangoFcFont *font); |
79 | /*< private >*/ |
80 | |
81 | /* Padding for future expansion */ |
82 | void (*_pango_reserved1) (void); |
83 | void (*_pango_reserved2) (void); |
84 | void (*_pango_reserved3) (void); |
85 | void (*_pango_reserved4) (void); |
86 | }; |
87 | |
88 | |
89 | G_END_DECLS |
90 | #endif /* __PANGO_FC_FONT_PRIVATE_H__ */ |
91 | |