1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>PangoFcFontMap</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.74.3">
7 <link rel="home" href="index.html" title="Pango Reference Manual">
8 <link rel="up" href="lowlevel.html" title="Low Level Functionality">
9 <link rel="prev" href="PangoRenderer.html" title="PangoRenderer">
10 <link rel="next" href="PangoFcFont.html" title="PangoFcFont">
11 <meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="chapter" href="pango.html" title="Basic Pango Interfaces">
14 <link rel="chapter" href="rendering.html" title="Rendering with Pango">
15 <link rel="chapter" href="lowlevel.html" title="Low Level Functionality">
16 <link rel="chapter" href="tools.html" title="Pango Tools">
17 <link rel="chapter" href="pango-hierarchy.html" title="Object Hierarchy">
18 <link rel="index" href="index-all.html" title="Index">
19 <link rel="index" href="index-deprecated.html" title="Index of deprecated symbols">
20 <link rel="index" href="index-1.2.html" title="Index of new symbols in 1.2">
21 <link rel="index" href="index-1.4.html" title="Index of new symbols in 1.4">
22 <link rel="index" href="index-1.6.html" title="Index of new symbols in 1.6">
23 <link rel="index" href="index-1.8.html" title="Index of new symbols in 1.8">
24 <link rel="index" href="index-1.10.html" title="Index of new symbols in 1.10">
25 <link rel="index" href="index-1.12.html" title="Index of new symbols in 1.12">
26 <link rel="index" href="index-1.14.html" title="Index of new symbols in 1.14">
27 <link rel="index" href="index-1.16.html" title="Index of new symbols in 1.16">
28 <link rel="index" href="index-1.18.html" title="Index of new symbols in 1.18">
29 <link rel="index" href="index-1.20.html" title="Index of new symbols in 1.20">
30 <link rel="index" href="index-1.22.html" title="Index of new symbols in 1.22">
31 <link rel="index" href="index-1.24.html" title="Index of new symbols in 1.24">
32 <link rel="index" href="index-1.26.html" title="Index of new symbols in 1.26">
34 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
35 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
37 <td><a accesskey="p" href="PangoRenderer.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
38 <td><a accesskey="u" href="lowlevel.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
39 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
40 <th width="100%" align="center">Pango Reference Manual</th>
41 <td><a accesskey="n" href="PangoFcFont.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
43 <tr><td colspan="5" class="shortcuts">
44 <a href="#PangoFcFontMap.synopsis" class="shortcut">Top</a>
46 <a href="#PangoFcFontMap.description" class="shortcut">Description</a>
48 <a href="#PangoFcFontMap.object-hierarchy" class="shortcut">Object Hierarchy</a>
51 <div class="refentry" lang="en">
52 <a name="PangoFcFontMap"></a><div class="titlepage"></div>
53 <div class="refnamediv"><table width="100%"><tr>
55 <h2><span class="refentrytitle"><a name="PangoFcFontMap.top_of_page"></a>PangoFcFontMap</span></h2>
56 <p>PangoFcFontMap — Base fontmap class for Fontconfig-based backends</p>
58 <td valign="top" align="right"></td>
60 <div class="refsynopsisdiv">
61 <a name="PangoFcFontMap.synopsis"></a><h2>Synopsis</h2>
62 <pre class="synopsis">
63 <a class="link" href="PangoFcFontMap.html#PangoFcFontMap-struct" title="PangoFcFontMap">PangoFcFontMap</a>;
64 <a class="link" href="PangoFcFontMap.html#PangoFcFontMapClass" title="PangoFcFontMapClass">PangoFcFontMapClass</a>;
65 <a class="link" href="pango-Text-Processing.html#PangoContext">PangoContext</a> * <a class="link" href="PangoFcFontMap.html#pango-fc-font-map-create-context" title="pango_fc_font_map_create_context ()">pango_fc_font_map_create_context</a> (<a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);
66 <a class="link" href="PangoFcDecoder.html" title="PangoFcDecoder">PangoFcDecoder</a> * (<a class="link" href="PangoFcFontMap.html#PangoFcDecoderFindFunc" title="PangoFcDecoderFindFunc ()">*PangoFcDecoderFindFunc</a>) (FcPattern *pattern,
68 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
69 >gpointer</a> user_data);
70 void <a class="link" href="PangoFcFontMap.html#pango-fc-font-map-add-decoder-find-func" title="pango_fc_font_map_add_decoder_find_func ()">pango_fc_font_map_add_decoder_find_func</a>
71 (<a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap,
72 <a class="link" href="PangoFcFontMap.html#PangoFcDecoderFindFunc" title="PangoFcDecoderFindFunc ()">PangoFcDecoderFindFunc</a> findfunc,
74 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
75 >gpointer</a> user_data,
77 href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
78 >GDestroyNotify</a> dnotify);
79 <a class="link" href="PangoFcDecoder.html" title="PangoFcDecoder">PangoFcDecoder</a> * <a class="link" href="PangoFcFontMap.html#pango-fc-font-map-find-decoder" title="pango_fc_font_map_find_decoder ()">pango_fc_font_map_find_decoder</a> (<a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap,
81 void <a class="link" href="PangoFcFontMap.html#pango-fc-font-map-cache-clear" title="pango_fc_font_map_cache_clear ()">pango_fc_font_map_cache_clear</a> (<a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);
82 void <a class="link" href="PangoFcFontMap.html#pango-fc-font-map-shutdown" title="pango_fc_font_map_shutdown ()">pango_fc_font_map_shutdown</a> (<a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);
83 <a class="link" href="pango-Fonts.html#PangoFontDescription" title="PangoFontDescription">PangoFontDescription</a> * <a class="link" href="PangoFcFontMap.html#pango-fc-font-description-from-pattern" title="pango_fc_font_description_from_pattern ()">pango_fc_font_description_from_pattern</a>
86 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
87 >gboolean</a> include_size);
88 #define <a class="link" href="PangoFcFontMap.html#PANGO-FC-GRAVITY--CAPS" title="PANGO_FC_GRAVITY">PANGO_FC_GRAVITY</a>
89 #define <a class="link" href="PangoFcFontMap.html#PANGO-FC-VERSION--CAPS" title="PANGO_FC_VERSION">PANGO_FC_VERSION</a>
90 #define <a class="link" href="PangoFcFontMap.html#PANGO-FC-PRGNAME--CAPS" title="PANGO_FC_PRGNAME">PANGO_FC_PRGNAME</a>
93 <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a>;
95 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
96 >gpointer</a> <a class="link" href="PangoFcFontMap.html#pango-fc-fontset-key-get-context-key" title="pango_fc_fontset_key_get_context_key ()">pango_fc_fontset_key_get_context_key</a>
97 (const <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a> *key);
98 const <a class="link" href="pango-Fonts.html#PangoFontDescription" title="PangoFontDescription">PangoFontDescription</a> * <a class="link" href="PangoFcFontMap.html#pango-fc-fontset-key-get-description" title="pango_fc_fontset_key_get_description ()">pango_fc_fontset_key_get_description</a>
99 (const <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a> *key);
100 <a class="link" href="pango-Scripts-and-Languages.html#PangoLanguage" title="PangoLanguage">PangoLanguage</a> * <a class="link" href="PangoFcFontMap.html#pango-fc-fontset-key-get-language" title="pango_fc_fontset_key_get_language ()">pango_fc_fontset_key_get_language</a> (const <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a> *key);
101 const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> * <a class="link" href="PangoFcFontMap.html#pango-fc-fontset-key-get-matrix" title="pango_fc_fontset_key_get_matrix ()">pango_fc_fontset_key_get_matrix</a> (const <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a> *key);
102 double <a class="link" href="PangoFcFontMap.html#pango-fc-fontset-key-get-absolute-size" title="pango_fc_fontset_key_get_absolute_size ()">pango_fc_fontset_key_get_absolute_size</a>
103 (const <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a> *key);
104 double <a class="link" href="PangoFcFontMap.html#pango-fc-fontset-key-get-resolution" title="pango_fc_fontset_key_get_resolution ()">pango_fc_fontset_key_get_resolution</a> (const <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a> *key);
105 <a class="link" href="PangoFcFontMap.html#PangoFcFontKey" title="PangoFcFontKey">PangoFcFontKey</a>;
107 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
108 >gpointer</a> <a class="link" href="PangoFcFontMap.html#pango-fc-font-key-get-context-key" title="pango_fc_font_key_get_context_key ()">pango_fc_font_key_get_context_key</a> (const <a class="link" href="PangoFcFontMap.html#PangoFcFontKey" title="PangoFcFontKey">PangoFcFontKey</a> *key);
109 const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> * <a class="link" href="PangoFcFontMap.html#pango-fc-font-key-get-matrix" title="pango_fc_font_key_get_matrix ()">pango_fc_font_key_get_matrix</a> (const <a class="link" href="PangoFcFontMap.html#PangoFcFontKey" title="PangoFcFontKey">PangoFcFontKey</a> *key);
110 const FcPattern * <a class="link" href="PangoFcFontMap.html#pango-fc-font-key-get-pattern" title="pango_fc_font_key_get_pattern ()">pango_fc_font_key_get_pattern</a> (const <a class="link" href="PangoFcFontMap.html#PangoFcFontKey" title="PangoFcFontKey">PangoFcFontKey</a> *key);
113 <div class="refsect1" lang="en">
114 <a name="PangoFcFontMap.object-hierarchy"></a><h2>Object Hierarchy</h2>
115 <pre class="synopsis">
117 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject"
119 +----<a class="link" href="pango-Fonts.html#PangoFontMap">PangoFontMap</a>
121 +----<a class="link" href="pango-FreeType-Fonts-and-Rendering.html#PangoFT2FontMap">PangoFT2FontMap</a>
122 +----<a class="link" href="pango-Xft-Fonts-and-Rendering.html#PangoXftFontMap">PangoXftFontMap</a>
125 <div class="refsect1" lang="en">
126 <a name="PangoFcFontMap.description"></a><h2>Description</h2>
128 PangoFcFontMap is a base class for font map implementations using the
129 Fontconfig and FreeType libraries. It is used in the
130 <a class="link" href="pango-Xft-Fonts-and-Rendering.html" title="Xft Fonts and Rendering">Xft</a> and
131 <a class="link" href="pango-FreeType-Fonts-and-Rendering.html" title="FreeType Fonts and Rendering">FreeType</a>
132 backends shipped with Pango, but can also be used when creating
133 new backends. Any backend deriving from this base class will
134 take advantage of the wide range of shapers implemented using
135 FreeType that come with Pango.
138 <div class="refsect1" lang="en">
139 <a name="PangoFcFontMap.details"></a><h2>Details</h2>
140 <div class="refsect2" lang="en">
141 <a name="PangoFcFontMap-struct"></a><h3>PangoFcFontMap</h3>
142 <pre class="programlisting">typedef struct _PangoFcFontMap PangoFcFontMap;</pre>
144 <a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a> is a base class for font map implementations
145 using the Fontconfig and FreeType libraries. To create a new
146 backend using Fontconfig and FreeType, you derive from this class
147 and implement a <code class="function">new_font()</code> virtual function that creates an
148 instance deriving from <a class="link" href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a>.</p>
153 <div class="refsect2" lang="en">
154 <a name="PangoFcFontMapClass"></a><h3>PangoFcFontMapClass</h3>
155 <pre class="programlisting">typedef struct {
156 /* Deprecated in favor of fontset_key_substitute */
157 void (*default_substitute) (PangoFcFontMap *fontmap,
159 /* Deprecated in favor of create_font */
160 PangoFcFont *(*new_font) (PangoFcFontMap *fontmap,
163 double (*get_resolution) (PangoFcFontMap *fcfontmap,
164 PangoContext *context);
166 gconstpointer (*context_key_get) (PangoFcFontMap *fcfontmap,
167 PangoContext *context);
168 gpointer (*context_key_copy) (PangoFcFontMap *fcfontmap,
170 void (*context_key_free) (PangoFcFontMap *fcfontmap,
172 guint32 (*context_key_hash) (PangoFcFontMap *fcfontmap,
174 gboolean (*context_key_equal) (PangoFcFontMap *fcfontmap,
176 gconstpointer key_b);
178 void (*fontset_key_substitute)(PangoFcFontMap *fontmap,
179 PangoFcFontsetKey *fontsetkey,
181 PangoFcFont *(*create_font) (PangoFcFontMap *fontmap,
182 PangoFcFontKey *fontkey);
183 } PangoFcFontMapClass;
186 Class structure for <a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a>.</p>
189 <div class="variablelist"><table border="0">
190 <col align="left" valign="top">
193 <td><p><span class="term"><em class="structfield"><code>default_substitute</code></em> ()</span></p></td>
194 <td> Substitutes in default values for
195 unspecified fields in a <span class="type">FcPattern</span>. This will be called
196 prior to creating a font for the pattern. May be <a
197 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
198 ><code class="literal">NULL</code></a>.
199 Deprecated in favor of @<code class="function">font_key_substitute()</code>.
203 <td><p><span class="term"><em class="structfield"><code>new_font</code></em> ()</span></p></td>
204 <td> Creates a new <a class="link" href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a> for the specified
205 pattern of the appropriate type for this font map. The
206 <em class="parameter"><code>pattern</code></em> argument must be passed to the "pattern" property
207 of <a class="link" href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a> when you call <a
208 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-new"
209 ><code class="function">g_object_new()</code></a>. Deprecated
210 in favor of @<code class="function">create_font()</code>.
214 <td><p><span class="term"><em class="structfield"><code>get_resolution</code></em> ()</span></p></td>
215 <td> Gets the resolution (the scale factor
216 between logical and absolute font sizes) that the backend
217 will use for a particular fontmap and context. <em class="parameter"><code>context</code></em>
222 <td><p><span class="term"><em class="structfield"><code>context_key_get</code></em> ()</span></p></td>
223 <td> Gets an opaque key holding backend
224 specific options for the context that will affect
225 fonts created by <code class="function">create_font()</code>. The result must point to
226 persistant storage owned by the fontmap. This key
227 is used to index hash tables used to look up fontsets
232 <td><p><span class="term"><em class="structfield"><code>context_key_copy</code></em> ()</span></p></td>
233 <td> Copies a context key. Pango uses this
234 to make a persistant copy of the value returned from
235 <em class="parameter"><code>context_key_get</code></em>.
239 <td><p><span class="term"><em class="structfield"><code>context_key_free</code></em> ()</span></p></td>
240 <td> Frees a context key copied with
241 <em class="parameter"><code>context_key_copy</code></em>.
245 <td><p><span class="term"><em class="structfield"><code>context_key_hash</code></em> ()</span></p></td>
246 <td> Gets a hash value for a context key
250 <td><p><span class="term"><em class="structfield"><code>context_key_equal</code></em> ()</span></p></td>
251 <td> Compares two context keys for equality.
255 <td><p><span class="term"><em class="structfield"><code>fontset_key_substitute</code></em> ()</span></p></td>
256 <td> Substitutes in default values for
257 unspecified fields in a <span class="type">FcPattern</span>. This will be called
258 prior to creating a font for the pattern. May be <a
259 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
260 ><code class="literal">NULL</code></a>.
265 <td><p><span class="term"><em class="structfield"><code>create_font</code></em> ()</span></p></td>
266 <td> Creates a new <a class="link" href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a> for the specified
267 pattern of the appropriate type for this font map using
268 information from the font key that is passed in. The
269 <em class="parameter"><code>pattern</code></em> member of <em class="parameter"><code>font_key</code></em> can be retrieved using
270 <a class="link" href="PangoFcFontMap.html#pango-fc-font-key-get-pattern" title="pango_fc_font_key_get_pattern ()"><code class="function">pango_fc_font_key_get_pattern()</code></a> and must be passed to
271 the "pattern" property of <a class="link" href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a> when you call
273 href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-new"
274 ><code class="function">g_object_new()</code></a>. If <a
275 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
276 ><code class="literal">NULL</code></a>, <code class="function">new_font()</code> is used.
284 <div class="refsect2" lang="en">
285 <a name="pango-fc-font-map-create-context"></a><h3>pango_fc_font_map_create_context ()</h3>
286 <pre class="programlisting"><a class="link" href="pango-Text-Processing.html#PangoContext">PangoContext</a> * pango_fc_font_map_create_context (<a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);</pre>
287 <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
288 <h3 class="title">Warning</h3>
289 <p><code class="literal">pango_fc_font_map_create_context</code> has been deprecated since version 1.22 and should not be used in newly-written code. Use <a class="link" href="pango-Fonts.html#pango-font-map-create-context" title="pango_font_map_create_context ()"><code class="function">pango_font_map_create_context()</code></a> instead.</p>
292 Creates a new context for this fontmap. This function is intended
293 only for backend implementations deriving from <span class="type">PangoFcFontmap</span>;
294 it is possible that a backend will store additional information
295 needed for correct operation on the <a class="link" href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a> after calling
299 <div class="variablelist"><table border="0">
300 <col align="left" valign="top">
303 <td><p><span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></p></td>
304 <td> a <a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a>
308 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
309 <td> a new <a class="link" href="pango-Text-Processing.html#PangoContext"><span class="type">PangoContext</span></a>
315 <p class="since">Since 1.4</p>
318 <div class="refsect2" lang="en">
319 <a name="PangoFcDecoderFindFunc"></a><h3>PangoFcDecoderFindFunc ()</h3>
320 <pre class="programlisting"><a class="link" href="PangoFcDecoder.html" title="PangoFcDecoder">PangoFcDecoder</a> * (*PangoFcDecoderFindFunc) (FcPattern *pattern,
322 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
323 >gpointer</a> user_data);</pre>
325 Callback function passed to <a class="link" href="PangoFcFontMap.html#pango-fc-font-map-add-decoder-find-func" title="pango_fc_font_map_add_decoder_find_func ()"><code class="function">pango_fc_font_map_add_decoder_find_func()</code></a>.</p>
328 <div class="variablelist"><table border="0">
329 <col align="left" valign="top">
332 <td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
333 <td> a fully resolved <span class="type">FcPattern</span> specifying the font on the system
337 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
338 <td> user data passed to <a class="link" href="PangoFcFontMap.html#pango-fc-font-map-add-decoder-find-func" title="pango_fc_font_map_add_decoder_find_func ()"><code class="function">pango_fc_font_map_add_decoder_find_func()</code></a>
342 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
343 <td> a new reference to a custom decoder for this pattern,
345 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
346 ><code class="literal">NULL</code></a> if the default decoder handling should be used.
353 <div class="refsect2" lang="en">
354 <a name="pango-fc-font-map-add-decoder-find-func"></a><h3>pango_fc_font_map_add_decoder_find_func ()</h3>
355 <pre class="programlisting">void pango_fc_font_map_add_decoder_find_func
356 (<a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap,
357 <a class="link" href="PangoFcFontMap.html#PangoFcDecoderFindFunc" title="PangoFcDecoderFindFunc ()">PangoFcDecoderFindFunc</a> findfunc,
359 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
360 >gpointer</a> user_data,
362 href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
363 >GDestroyNotify</a> dnotify);</pre>
365 This function saves a callback method in the <a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a> that
366 will be called whenever new fonts are created. If the
367 function returns a <a class="link" href="PangoFcDecoder.html" title="PangoFcDecoder"><span class="type">PangoFcDecoder</span></a>, that decoder will be used to
368 determine both coverage via a <span class="type">FcCharSet</span> and a one-to-one mapping of
369 characters to glyphs. This will allow applications to have
370 application-specific encodings for various fonts.</p>
373 <div class="variablelist"><table border="0">
374 <col align="left" valign="top">
377 <td><p><span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></p></td>
378 <td> The <a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a> to add this method to.
382 <td><p><span class="term"><em class="parameter"><code>findfunc</code></em> :</span></p></td>
383 <td> The <a class="link" href="PangoFcFontMap.html#PangoFcDecoderFindFunc" title="PangoFcDecoderFindFunc ()"><span class="type">PangoFcDecoderFindFunc</span></a> callback function
387 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
392 <td><p><span class="term"><em class="parameter"><code>dnotify</code></em> :</span></p></td>
394 href="http://library.gnome.org/devel/glib/unstable/glib-Datasets.html#GDestroyNotify"
395 ><span class="type">GDestroyNotify</span></a> callback that will be called when the
396 fontmap is finalized and the decoder is released.
401 <p class="since">Since 1.6.</p>
404 <div class="refsect2" lang="en">
405 <a name="pango-fc-font-map-find-decoder"></a><h3>pango_fc_font_map_find_decoder ()</h3>
406 <pre class="programlisting"><a class="link" href="PangoFcDecoder.html" title="PangoFcDecoder">PangoFcDecoder</a> * pango_fc_font_map_find_decoder (<a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap,
407 FcPattern *pattern);</pre>
409 Finds the decoder to use for <em class="parameter"><code>pattern</code></em>. Decoders can be added to
410 a font map using <a class="link" href="PangoFcFontMap.html#pango-fc-font-map-add-decoder-find-func" title="pango_fc_font_map_add_decoder_find_func ()"><code class="function">pango_fc_font_map_add_decoder_find_func()</code></a>.</p>
413 <div class="variablelist"><table border="0">
414 <col align="left" valign="top">
417 <td><p><span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></p></td>
418 <td> The <a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a> to use.
422 <td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
423 <td> The <span class="type">FcPattern</span> to find the decoder for.
427 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
428 <td> a newly created <a class="link" href="PangoFcDecoder.html" title="PangoFcDecoder"><span class="type">PangoFcDecoder</span></a> object or <a
429 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL--CAPS"
430 ><code class="literal">NULL</code></a> if
431 no decoder is set for <em class="parameter"><code>pattern</code></em>.
437 <p class="since">Since 1.26.</p>
440 <div class="refsect2" lang="en">
441 <a name="pango-fc-font-map-cache-clear"></a><h3>pango_fc_font_map_cache_clear ()</h3>
442 <pre class="programlisting">void pango_fc_font_map_cache_clear (<a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);</pre>
444 Clear all cached information and fontsets for this font map;
445 this should be called whenever there is a change in the
446 output of the <code class="function">default_substitute()</code> virtual function of the
447 font map, or if fontconfig has been reinitialized to new
451 <div class="variablelist"><table border="0">
452 <col align="left" valign="top">
454 <td><p><span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></p></td>
455 <td> a <span class="type">PangoFcFontmap</span>
459 <p class="since">Since 1.4</p>
462 <div class="refsect2" lang="en">
463 <a name="pango-fc-font-map-shutdown"></a><h3>pango_fc_font_map_shutdown ()</h3>
464 <pre class="programlisting">void pango_fc_font_map_shutdown (<a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap">PangoFcFontMap</a> *fcfontmap);</pre>
466 Clears all cached information for the fontmap and marks
467 all fonts open for the fontmap as dead. (See the <code class="function">shutdown()</code>
468 virtual function of <a class="link" href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a>.) This function might be used
469 by a backend when the underlying windowing system for the font
470 map exits. This function is only intended to be called
471 only for backend implementations deriving from <span class="type">PangoFcFontmap</span>.</p>
474 <div class="variablelist"><table border="0">
475 <col align="left" valign="top">
477 <td><p><span class="term"><em class="parameter"><code>fcfontmap</code></em> :</span></p></td>
478 <td> a <span class="type">PangoFcFontmap</span>
482 <p class="since">Since 1.4</p>
485 <div class="refsect2" lang="en">
486 <a name="pango-fc-font-description-from-pattern"></a><h3>pango_fc_font_description_from_pattern ()</h3>
487 <pre class="programlisting"><a class="link" href="pango-Fonts.html#PangoFontDescription" title="PangoFontDescription">PangoFontDescription</a> * pango_fc_font_description_from_pattern
490 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"
491 >gboolean</a> include_size);</pre>
493 Creates a <a class="link" href="pango-Fonts.html#PangoFontDescription" title="PangoFontDescription"><span class="type">PangoFontDescription</span></a> that matches the specified
494 Fontconfig pattern as closely as possible. Many possible Fontconfig
495 pattern values, such as <code class="literal">FC_RASTERIZER</code> or <code class="literal">FC_DPI</code>, don't make sense in
496 the context of <a class="link" href="pango-Fonts.html#PangoFontDescription" title="PangoFontDescription"><span class="type">PangoFontDescription</span></a>, so will be ignored.</p>
499 <div class="variablelist"><table border="0">
500 <col align="left" valign="top">
503 <td><p><span class="term"><em class="parameter"><code>pattern</code></em> :</span></p></td>
504 <td> a <span class="type">FcPattern</span>
508 <td><p><span class="term"><em class="parameter"><code>include_size</code></em> :</span></p></td>
510 href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE--CAPS"
511 ><code class="literal">TRUE</code></a>, the pattern will include the size from
512 the <em class="parameter"><code>pattern</code></em>; otherwise the resulting pattern will be unsized.
513 (only <code class="literal">FC_SIZE</code> is examined, not <code class="literal">FC_PIXEL_SIZE</code>)
517 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
518 <td> a new <a class="link" href="pango-Fonts.html#PangoFontDescription" title="PangoFontDescription"><span class="type">PangoFontDescription</span></a>. Free with
519 <a class="link" href="pango-Fonts.html#pango-font-description-free" title="pango_font_description_free ()"><code class="function">pango_font_description_free()</code></a>.
525 <p class="since">Since 1.4</p>
528 <div class="refsect2" lang="en">
529 <a name="PANGO-FC-GRAVITY--CAPS"></a><h3>PANGO_FC_GRAVITY</h3>
530 <pre class="programlisting">#define PANGO_FC_GRAVITY "pangogravity"
533 String representing a fontconfig property name that Pango sets on any
534 fontconfig pattern it passes to fontconfig if a <a class="link" href="pango-Vertical-Text.html#PangoGravity" title="enum PangoGravity"><span class="type">PangoGravity</span></a> other
535 than <code class="literal">PangoGravitySouth</code> is desired.
538 The property will have a <a class="link" href="pango-Vertical-Text.html#PangoGravity" title="enum PangoGravity"><span class="type">PangoGravity</span></a> value as a string, like "east".
539 This can be used to write fontconfig configuration rules to choose
540 different fonts for horizontal and vertical writing directions.</p>
543 <p class="since">Since 1.20</p>
546 <div class="refsect2" lang="en">
547 <a name="PANGO-FC-VERSION--CAPS"></a><h3>PANGO_FC_VERSION</h3>
548 <pre class="programlisting">#define PANGO_FC_VERSION "pangoversion"
551 String representing a fontconfig property name that Pango sets on any
552 fontconfig pattern it passes to fontconfig.
555 The property will have an integer value equal to what
556 <a class="link" href="pango-Version-Checking.html#pango-version" title="pango_version ()"><code class="function">pango_version()</code></a> returns.
557 This can be used to write fontconfig configuration rules that only affect
558 certain pango versions (or only pango-using applications, or only
559 non-pango-using applications).</p>
562 <p class="since">Since 1.20</p>
565 <div class="refsect2" lang="en">
566 <a name="PANGO-FC-PRGNAME--CAPS"></a><h3>PANGO_FC_PRGNAME</h3>
567 <pre class="programlisting">#define PANGO_FC_PRGNAME "pangoprgname"
570 String representing a fontconfig property name that Pango sets on any
571 fontconfig pattern it passes to fontconfig.
574 The property will have a string equal to what
576 href="http://library.gnome.org/devel/glib/unstable/glib-Miscellaneous-Utility-Functions.html#g-get-prgname"
577 ><code class="function">g_get_prgname()</code></a> returns.
578 This can be used to write fontconfig configuration rules that only affect
579 certain applications.</p>
582 <p class="since">Since 1.24</p>
585 <div class="refsect2" lang="en">
586 <a name="PangoFcFontsetKey"></a><h3>PangoFcFontsetKey</h3>
587 <pre class="programlisting">typedef struct _PangoFcFontsetKey PangoFcFontsetKey;</pre>
589 An opaque structure containing all the information needed for
590 loading a fontset with the PangoFc fontmap.</p>
593 <p class="since">Since 1.24</p>
596 <div class="refsect2" lang="en">
597 <a name="pango-fc-fontset-key-get-context-key"></a><h3>pango_fc_fontset_key_get_context_key ()</h3>
598 <pre class="programlisting"><a
599 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
600 >gpointer</a> pango_fc_fontset_key_get_context_key
601 (const <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a> *key);</pre>
603 Gets the context key member of <em class="parameter"><code>key</code></em>.</p>
606 <div class="variablelist"><table border="0">
607 <col align="left" valign="top">
610 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
615 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
616 <td> the context key, which is owned by <em class="parameter"><code>key</code></em> and should not be modified.
622 <p class="since">Since 1.24</p>
625 <div class="refsect2" lang="en">
626 <a name="pango-fc-fontset-key-get-description"></a><h3>pango_fc_fontset_key_get_description ()</h3>
627 <pre class="programlisting">const <a class="link" href="pango-Fonts.html#PangoFontDescription" title="PangoFontDescription">PangoFontDescription</a> * pango_fc_fontset_key_get_description
628 (const <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a> *key);</pre>
630 Gets the font description of <em class="parameter"><code>key</code></em>.</p>
633 <div class="variablelist"><table border="0">
634 <col align="left" valign="top">
637 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
642 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
643 <td> the font description, which is owned by <em class="parameter"><code>key</code></em> and should not be modified.
649 <p class="since">Since 1.24</p>
652 <div class="refsect2" lang="en">
653 <a name="pango-fc-fontset-key-get-language"></a><h3>pango_fc_fontset_key_get_language ()</h3>
654 <pre class="programlisting"><a class="link" href="pango-Scripts-and-Languages.html#PangoLanguage" title="PangoLanguage">PangoLanguage</a> * pango_fc_fontset_key_get_language (const <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a> *key);</pre>
656 Gets the language member of <em class="parameter"><code>key</code></em>.</p>
659 <div class="variablelist"><table border="0">
660 <col align="left" valign="top">
663 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
668 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
675 <p class="since">Since 1.24</p>
678 <div class="refsect2" lang="en">
679 <a name="pango-fc-fontset-key-get-matrix"></a><h3>pango_fc_fontset_key_get_matrix ()</h3>
680 <pre class="programlisting">const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> * pango_fc_fontset_key_get_matrix (const <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a> *key);</pre>
682 Gets the matrix member of <em class="parameter"><code>key</code></em>.</p>
685 <div class="variablelist"><table border="0">
686 <col align="left" valign="top">
689 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
694 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
695 <td> the matrix, which is owned by <em class="parameter"><code>key</code></em> and should not be modified.
701 <p class="since">Since 1.24</p>
704 <div class="refsect2" lang="en">
705 <a name="pango-fc-fontset-key-get-absolute-size"></a><h3>pango_fc_fontset_key_get_absolute_size ()</h3>
706 <pre class="programlisting">double pango_fc_fontset_key_get_absolute_size
707 (const <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a> *key);</pre>
709 Gets the absolute font size of <em class="parameter"><code>key</code></em> in Pango units. This is adjusted
710 for both resolution and transformation matrix.</p>
713 <div class="variablelist"><table border="0">
714 <col align="left" valign="top">
717 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
722 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
723 <td> the pixel size of <em class="parameter"><code>key</code></em>.
729 <p class="since">Since 1.24</p>
732 <div class="refsect2" lang="en">
733 <a name="pango-fc-fontset-key-get-resolution"></a><h3>pango_fc_fontset_key_get_resolution ()</h3>
734 <pre class="programlisting">double pango_fc_fontset_key_get_resolution (const <a class="link" href="PangoFcFontMap.html#PangoFcFontsetKey" title="PangoFcFontsetKey">PangoFcFontsetKey</a> *key);</pre>
736 Gets the resolution of <em class="parameter"><code>key</code></em></p>
739 <div class="variablelist"><table border="0">
740 <col align="left" valign="top">
743 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
748 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
749 <td> the resolution of <em class="parameter"><code>key</code></em>
755 <p class="since">Since 1.24</p>
758 <div class="refsect2" lang="en">
759 <a name="PangoFcFontKey"></a><h3>PangoFcFontKey</h3>
760 <pre class="programlisting">typedef struct _PangoFcFontKey PangoFcFontKey;</pre>
762 An opaque structure containing all the information needed for
763 loading a font with the PangoFc fontmap.</p>
766 <p class="since">Since 1.24</p>
769 <div class="refsect2" lang="en">
770 <a name="pango-fc-font-key-get-context-key"></a><h3>pango_fc_font_key_get_context_key ()</h3>
771 <pre class="programlisting"><a
772 href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"
773 >gpointer</a> pango_fc_font_key_get_context_key (const <a class="link" href="PangoFcFontMap.html#PangoFcFontKey" title="PangoFcFontKey">PangoFcFontKey</a> *key);</pre>
775 Gets the context key member of <em class="parameter"><code>key</code></em>.</p>
778 <div class="variablelist"><table border="0">
779 <col align="left" valign="top">
782 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
787 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
788 <td> the context key, which is owned by <em class="parameter"><code>key</code></em> and should not be modified.
794 <p class="since">Since 1.24</p>
797 <div class="refsect2" lang="en">
798 <a name="pango-fc-font-key-get-matrix"></a><h3>pango_fc_font_key_get_matrix ()</h3>
799 <pre class="programlisting">const <a class="link" href="pango-Glyph-Storage.html#PangoMatrix" title="PangoMatrix">PangoMatrix</a> * pango_fc_font_key_get_matrix (const <a class="link" href="PangoFcFontMap.html#PangoFcFontKey" title="PangoFcFontKey">PangoFcFontKey</a> *key);</pre>
801 Gets the matrix member of <em class="parameter"><code>key</code></em>.</p>
804 <div class="variablelist"><table border="0">
805 <col align="left" valign="top">
808 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
813 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
814 <td> the matrix, which is owned by <em class="parameter"><code>key</code></em> and should not be modified.
820 <p class="since">Since 1.24</p>
823 <div class="refsect2" lang="en">
824 <a name="pango-fc-font-key-get-pattern"></a><h3>pango_fc_font_key_get_pattern ()</h3>
825 <pre class="programlisting">const FcPattern * pango_fc_font_key_get_pattern (const <a class="link" href="PangoFcFontMap.html#PangoFcFontKey" title="PangoFcFontKey">PangoFcFontKey</a> *key);</pre>
827 Gets the fontconfig pattern member of <em class="parameter"><code>key</code></em>.</p>
830 <div class="variablelist"><table border="0">
831 <col align="left" valign="top">
834 <td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
839 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
840 <td> the pattern, which is owned by <em class="parameter"><code>key</code></em> and should not be modified.
846 <p class="since">Since 1.24</p>
849 <div class="refsect1" lang="en">
850 <a name="PangoFcFontMap.see-also"></a><h2>See Also</h2>
853 <div class="variablelist"><table border="0">
854 <col align="left" valign="top">
856 <td><p><span class="term"><a class="link" href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a></span></p></td>
857 <td><p>The base class for fonts; creating a new
858 Fontconfig-based backend involves deriving from both
859 <a class="link" href="PangoFcFontMap.html" title="PangoFcFontMap"><span class="type">PangoFcFontMap</span></a> and <a class="link" href="PangoFcFont.html" title="PangoFcFont"><span class="type">PangoFcFont</span></a>.
869 Generated by GTK-Doc V1.11</div>