Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
pangofc-fontmap.h
Go to the documentation of this file.
1/* Pango
2 * pangofc-fontmap.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_MAP_H__
23#define __PANGO_FC_FONT_MAP_H__
24
25#include <pango/pango.h>
26#include <fontconfig/fontconfig.h>
28#include <pango/pangofc-font.h>
29#include <hb.h>
30
32
33
34/*
35 * PangoFcFontMap
36 */
37
38#ifdef __GI_SCANNER__
39#define PANGO_FC_TYPE_FONT_MAP (pango_fc_font_map_get_type ())
40#define PANGO_FC_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_FC_TYPE_FONT_MAP, PangoFcFontMap))
41#define PANGO_FC_IS_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_FC_TYPE_FONT_MAP))
42#else
43#define PANGO_TYPE_FC_FONT_MAP (pango_fc_font_map_get_type ())
44#define PANGO_FC_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), PANGO_TYPE_FC_FONT_MAP, PangoFcFontMap))
45#define PANGO_IS_FC_FONT_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), PANGO_TYPE_FC_FONT_MAP))
46#endif
47
48typedef struct _PangoFcFontMap PangoFcFontMap;
49typedef struct _PangoFcFontMapClass PangoFcFontMapClass;
50typedef struct _PangoFcFontMapPrivate PangoFcFontMapPrivate;
51
54
57
59void
61
63void
65 FcConfig *fcconfig);
67FcConfig *
69
70/**
71 * PangoFcDecoderFindFunc:
72 * @pattern: a fully resolved `FcPattern` specifying the font on the system
73 * @user_data: user data passed to
74 * [method@PangoFc.FontMap.add_decoder_find_func]
75 *
76 * Callback function passed to [method@PangoFc.FontMap.add_decoder_find_func].
77 *
78 * Return value: a new reference to a custom decoder for this pattern,
79 * or %NULL if the default decoder handling should be used.
80 **/
81typedef PangoFcDecoder * (*PangoFcDecoderFindFunc) (FcPattern *pattern,
82 gpointer user_data);
83
87 gpointer user_data,
88 GDestroyNotify dnotify);
91 FcPattern *pattern);
92
95 gboolean include_size);
96
97#ifndef PANGO_DISABLE_DEPRECATED
100#endif
103
104
107 PangoFcFont *fcfont);
108
109/**
110 * PangoFcSubstituteFunc:
111 * @pattern: the FcPattern to tweak.
112 * @data: user data.
113 *
114 * Function type for doing final config tweaking on prepared `FcPattern`s.
115 */
116typedef void (*PangoFcSubstituteFunc) (FcPattern *pattern,
117 gpointer data);
118
119/**
120 * pango_fc_font_map_set_default_substitute:
121 * @fontmap: a `PangoFcFontMap`
122 * @func: function to call to to do final config tweaking on `FcPattern` objects
123 * @data: data to pass to @func
124 * @notify: function to call when @data is no longer used
125 *
126 * Sets a function that will be called to do final configuration
127 * substitution on a `FcPattern` before it is used to load
128 * the font.
129 *
130 * This function can be used to do things like set
131 * hinting and antialiasing options.
132 *
133 * Since: 1.48
134 */
138 gpointer data,
139 GDestroyNotify notify);
140
141/**
142 * pango_fc_font_map_substitute_changed:
143 * @fontmap: a `PangoFcFontMap`
144 *
145 * Call this function any time the results of the default
146 * substitution function set with
147 * [method@PangoFc.FontMap.set_default_substitute] change.
148 *
149 * That is, if your substitution function will return different
150 * results for the same input pattern, you must call this function.
151 *
152 * Since: 1.48
153 */
156
157/**
158 * PANGO_FC_GRAVITY:
159 *
160 * Fontconfig property that Pango sets on any
161 * fontconfig pattern it passes to fontconfig
162 * if a `PangoGravity` other than %PANGO_GRAVITY_SOUTH
163 * is desired.
164 *
165 * The property will have a `PangoGravity` value as a string,
166 * like "east". This can be used to write fontconfig configuration
167 * rules to choose different fonts for horizontal and vertical
168 * writing directions.
169 *
170 * Since: 1.20
171 */
172#define PANGO_FC_GRAVITY "pangogravity"
173
174/**
175 * PANGO_FC_VERSION:
176 *
177 * Fontconfig property that Pango sets on any
178 * fontconfig pattern it passes to fontconfig.
179 *
180 * The property will have an integer value equal to what
181 * [func@Pango.version] returns. This can be used to write
182 * fontconfig configuration rules that only affect certain
183 * pango versions (or only pango-using applications, or only
184 * non-pango-using applications).
185 *
186 * Since: 1.20
187 */
188#define PANGO_FC_VERSION "pangoversion"
189
190/**
191 * PANGO_FC_PRGNAME:
192 *
193 * Fontconfig property that Pango sets on any
194 * fontconfig pattern it passes to fontconfig.
195 *
196 * The property will have a string equal to what
197 * g_get_prgname() returns. This can be used to write
198 * fontconfig configuration rules that only affect
199 * certain applications.
200 *
201 * This is equivalent to FC_PRGNAME in versions of
202 * fontconfig that have that.
203 *
204 * Since: 1.24
205 */
206#define PANGO_FC_PRGNAME "prgname"
207
208/**
209 * PANGO_FC_FONT_FEATURES:
210 *
211 * Fontconfig property that Pango reads from font
212 * patterns to populate list of OpenType features
213 * to be enabled for the font by default.
214 *
215 * The property will have a number of string elements,
216 * each of which is the OpenType feature tag of one feature
217 * to enable.
218 *
219 * This is equivalent to FC_FONT_FEATURES in versions of
220 * fontconfig that have that.
221 *
222 * Since: 1.34
223 */
224#define PANGO_FC_FONT_FEATURES "fontfeatures"
225
226/**
227 * PANGO_FC_FONT_VARIATIONS:
228 *
229 * Fontconfig property that Pango reads from font
230 * patterns to populate list of OpenType font variations
231 * to be used for a font.
232 *
233 * The property will have a string elements, each of which
234 * a comma-separated list of OpenType axis setting of the
235 * form AXIS=VALUE.
236 *
237 * This is equivalent to FC_FONT_VARIATIONS in versions of
238 * fontconfig that have that.
239 */
240#define PANGO_FC_FONT_VARIATIONS "fontvariations"
241
243
244#endif /* __PANGO_FC_FONT_MAP_H__ */
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
void * gpointer
Definition gtypes.h:109
void(* GDestroyNotify)(gpointer data)
Definition gtypes.h:140
struct hb_face_t hb_face_t
Definition hb-face.h:56
typedefG_BEGIN_DECLS struct _PangoFontDescription PangoFontDescription
Definition pango-font.h:43
PANGO_AVAILABLE_IN_1_22 PangoContext * pango_font_map_create_context(PangoFontMap *fontmap)
struct _PangoContext PangoContext
Definition pango-types.h:44
#define PANGO_AVAILABLE_IN_1_38
#define PANGO_AVAILABLE_IN_1_44
#define PANGO_AVAILABLE_IN_1_6
#define PANGO_AVAILABLE_IN_1_48
#define PANGO_AVAILABLE_IN_1_4
#define PANGO_DEPRECATED_IN_1_22_FOR(f)
#define PANGO_AVAILABLE_IN_ALL
#define PANGO_AVAILABLE_IN_1_26
struct _PangoFcFontMapPrivate PangoFcFontMapPrivate
PANGO_AVAILABLE_IN_1_6 void pango_fc_font_map_add_decoder_find_func(PangoFcFontMap *fcfontmap, PangoFcDecoderFindFunc findfunc, gpointer user_data, GDestroyNotify dnotify)
PANGO_AVAILABLE_IN_1_38 void pango_fc_font_map_set_config(PangoFcFontMap *fcfontmap, FcConfig *fcconfig)
PangoFcDecoder *(* PangoFcDecoderFindFunc)(FcPattern *pattern, gpointer user_data)
PANGO_AVAILABLE_IN_1_4 PangoFontDescription * pango_fc_font_description_from_pattern(FcPattern *pattern, gboolean include_size)
PangoContext * pango_fc_font_map_create_context(PangoFcFontMap *fcfontmap)
PANGO_AVAILABLE_IN_1_4 void pango_fc_font_map_cache_clear(PangoFcFontMap *fcfontmap)
struct _PangoFcFontMap PangoFcFontMap
PANGO_AVAILABLE_IN_1_38 void pango_fc_font_map_config_changed(PangoFcFontMap *fcfontmap)
PANGO_AVAILABLE_IN_1_44 hb_face_t * pango_fc_font_map_get_hb_face(PangoFcFontMap *fcfontmap, PangoFcFont *fcfont)
struct _PangoFcFontMapClass PangoFcFontMapClass
PANGO_AVAILABLE_IN_1_38 FcConfig * pango_fc_font_map_get_config(PangoFcFontMap *fcfontmap)
PANGO_AVAILABLE_IN_ALL GType pango_fc_font_map_get_type(void) G_GNUC_CONST
PANGO_AVAILABLE_IN_1_26 PangoFcDecoder * pango_fc_font_map_find_decoder(PangoFcFontMap *fcfontmap, FcPattern *pattern)
PANGO_AVAILABLE_IN_1_48 void pango_fc_font_map_substitute_changed(PangoFcFontMap *fontmap)
PANGO_AVAILABLE_IN_1_48 void pango_fc_font_map_set_default_substitute(PangoFcFontMap *fontmap, PangoFcSubstituteFunc func, gpointer data, GDestroyNotify notify)
PANGO_AVAILABLE_IN_1_4 void pango_fc_font_map_shutdown(PangoFcFontMap *fcfontmap)
void(* PangoFcSubstituteFunc)(FcPattern *pattern, gpointer data)