1 | /* Pango |
2 | * pangoft2.h: |
3 | * |
4 | * Copyright (C) 1999 Red Hat Software |
5 | * Copyright (C) 2000 Tor Lillqvist |
6 | * |
7 | * This library is free software; you can redistribute it and/or |
8 | * modify it under the terms of the GNU Library General Public |
9 | * License as published by the Free Software Foundation; either |
10 | * version 2 of the License, or (at your option) any later version. |
11 | * |
12 | * This library is distributed in the hope that it will be useful, |
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 | * Library General Public License for more details. |
16 | * |
17 | * You should have received a copy of the GNU Library General Public |
18 | * License along with this library; if not, write to the |
19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
20 | * Boston, MA 02111-1307, USA. |
21 | */ |
22 | |
23 | #ifndef __PANGOFT2_H__ |
24 | #define __PANGOFT2_H__ |
25 | |
26 | #include <fontconfig/fontconfig.h> |
27 | |
28 | #include <ft2build.h> |
29 | #include FT_FREETYPE_H |
30 | |
31 | #include <pango/pangofc-fontmap.h> |
32 | #include <pango/pango-layout.h> |
33 | #include <pango/pangofc-font.h> |
34 | |
35 | G_BEGIN_DECLS |
36 | |
37 | #ifndef __GI_SCANNER__ |
38 | |
39 | #ifndef PANGO_DISABLE_DEPRECATED |
40 | /** |
41 | * PANGO_RENDER_TYPE_FT2: (skip) |
42 | * |
43 | * A string constant that was used to identify shape engines that work |
44 | * with the FreeType backend. See %PANGO_RENDER_TYPE_FC for the replacement. |
45 | */ |
46 | #define PANGO_RENDER_TYPE_FT2 "PangoRenderFT2" |
47 | #endif |
48 | |
49 | #endif /* __GI_SCANNER__ */ |
50 | |
51 | #ifdef __GI_SCANNER__ |
52 | #define PANGO_FT2_TYPE_FONT_MAP (pango_ft2_font_map_get_type ()) |
53 | #define PANGO_FT2_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_FT2_TYPE_FONT_MAP, PangoFT2FontMap)) |
54 | #define PANGO_FT2_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_FT2_TYPE_FONT_MAP)) |
55 | #else |
56 | #define PANGO_TYPE_FT2_FONT_MAP (pango_ft2_font_map_get_type ()) |
57 | #define PANGO_FT2_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FT2_FONT_MAP, PangoFT2FontMap)) |
58 | #define PANGO_FT2_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FT2_FONT_MAP)) |
59 | #endif |
60 | |
61 | typedef struct _PangoFT2FontMap PangoFT2FontMap; |
62 | |
63 | /** |
64 | * PangoFT2SubstituteFunc: |
65 | * @pattern: the FcPattern to tweak. |
66 | * @data: user data. |
67 | * |
68 | * Function type for doing final config tweaking on prepared FcPatterns. |
69 | */ |
70 | typedef void (*PangoFT2SubstituteFunc) (FcPattern *pattern, |
71 | gpointer data); |
72 | |
73 | /* Calls for applications */ |
74 | |
75 | PANGO_AVAILABLE_IN_ALL |
76 | void pango_ft2_render (FT_Bitmap *bitmap, |
77 | PangoFont *font, |
78 | PangoGlyphString *glyphs, |
79 | gint x, |
80 | gint y); |
81 | PANGO_AVAILABLE_IN_1_6 |
82 | void pango_ft2_render_transformed (FT_Bitmap *bitmap, |
83 | const PangoMatrix *matrix, |
84 | PangoFont *font, |
85 | PangoGlyphString *glyphs, |
86 | int x, |
87 | int y); |
88 | |
89 | PANGO_AVAILABLE_IN_ALL |
90 | void pango_ft2_render_layout_line (FT_Bitmap *bitmap, |
91 | PangoLayoutLine *line, |
92 | int x, |
93 | int y); |
94 | PANGO_AVAILABLE_IN_1_6 |
95 | void pango_ft2_render_layout_line_subpixel (FT_Bitmap *bitmap, |
96 | PangoLayoutLine *line, |
97 | int x, |
98 | int y); |
99 | PANGO_AVAILABLE_IN_ALL |
100 | void pango_ft2_render_layout (FT_Bitmap *bitmap, |
101 | PangoLayout *layout, |
102 | int x, |
103 | int y); |
104 | PANGO_AVAILABLE_IN_1_6 |
105 | void pango_ft2_render_layout_subpixel (FT_Bitmap *bitmap, |
106 | PangoLayout *layout, |
107 | int x, |
108 | int y); |
109 | |
110 | PANGO_AVAILABLE_IN_ALL |
111 | GType pango_ft2_font_map_get_type (void) G_GNUC_CONST; |
112 | |
113 | PANGO_AVAILABLE_IN_1_2 |
114 | PangoFontMap *pango_ft2_font_map_new (void); |
115 | PANGO_AVAILABLE_IN_1_2 |
116 | void pango_ft2_font_map_set_resolution (PangoFT2FontMap *fontmap, |
117 | double dpi_x, |
118 | double dpi_y); |
119 | #ifndef PANGO_DISABLE_DEPRECATED |
120 | PANGO_DEPRECATED_IN_1_48_FOR(pango_fc_font_map_set_default_substitute) |
121 | void pango_ft2_font_map_set_default_substitute (PangoFT2FontMap *fontmap, |
122 | PangoFT2SubstituteFunc func, |
123 | gpointer data, |
124 | GDestroyNotify notify); |
125 | PANGO_DEPRECATED_IN_1_48_FOR(pango_fc_font_map_substitute_changed) |
126 | void pango_ft2_font_map_substitute_changed (PangoFT2FontMap *fontmap); |
127 | PANGO_DEPRECATED_IN_1_22_FOR(pango_font_map_create_context) |
128 | PangoContext *pango_ft2_font_map_create_context (PangoFT2FontMap *fontmap); |
129 | #endif |
130 | |
131 | |
132 | /* API for rendering modules |
133 | */ |
134 | #ifndef PANGO_DISABLE_DEPRECATED |
135 | PANGO_DEPRECATED_FOR(pango_font_map_create_context) |
136 | PangoContext *pango_ft2_get_context (double dpi_x, |
137 | double dpi_y); |
138 | PANGO_DEPRECATED_FOR(pango_ft2_font_map_new) |
139 | PangoFontMap *pango_ft2_font_map_for_display (void); |
140 | PANGO_DEPRECATED |
141 | void pango_ft2_shutdown_display (void); |
142 | |
143 | PANGO_DEPRECATED_FOR(PANGO_GET_UNKNOWN_GLYPH) |
144 | PangoGlyph pango_ft2_get_unknown_glyph (PangoFont *font); |
145 | PANGO_DEPRECATED_FOR(pango_fc_font_kern_glyphs) |
146 | int pango_ft2_font_get_kerning (PangoFont *font, |
147 | PangoGlyph left, |
148 | PangoGlyph right); |
149 | PANGO_DEPRECATED_FOR(pango_fc_font_lock_face) |
150 | FT_Face pango_ft2_font_get_face (PangoFont *font); |
151 | PANGO_DEPRECATED_FOR(pango_font_get_coverage) |
152 | PangoCoverage *pango_ft2_font_get_coverage (PangoFont *font, |
153 | PangoLanguage *language); |
154 | #endif /* PANGO_DISABLE_DEPRECATED */ |
155 | |
156 | G_END_DECLS |
157 | |
158 | #endif /* __PANGOFT2_H__ */ |
159 | |