comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gtk-doc/html/cairo/cairo-cairo-font-face-t.html @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
comparison
equal deleted inserted replaced
67:0e9998148a16 68:5028fdace37b
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>cairo_font_face_t: Cairo: A Vector Graphics Library</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="index.html" title="Cairo: A Vector Graphics Library">
8 <link rel="up" href="cairo-fonts.html" title="Fonts">
9 <link rel="prev" href="cairo-fonts.html" title="Fonts">
10 <link rel="next" href="cairo-cairo-scaled-font-t.html" title="cairo_scaled_font_t">
11 <meta name="generator" content="GTK-Doc V1.27 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18 <a href="#cairo-cairo-font-face-t.description" class="shortcut">Description</a></span>
19 </td>
20 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
21 <td><a accesskey="u" href="cairo-fonts.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
22 <td><a accesskey="p" href="cairo-fonts.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="cairo-cairo-scaled-font-t.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
24 </tr></table>
25 <div class="refentry">
26 <a name="cairo-cairo-font-face-t"></a><div class="titlepage"></div>
27 <div class="refnamediv"><table width="100%"><tr>
28 <td valign="top">
29 <h2><span class="refentrytitle"><a name="cairo-cairo-font-face-t.top_of_page"></a>cairo_font_face_t</span></h2>
30 <p>cairo_font_face_t — Base class for font faces</p>
31 </td>
32 <td class="gallery_image" valign="top" align="right"></td>
33 </tr></table></div>
34 <div class="refsect1">
35 <a name="cairo-cairo-font-face-t.functions"></a><h2>Functions</h2>
36 <div class="informaltable"><table class="informaltable" width="100%" border="0">
37 <colgroup>
38 <col width="150px" class="functions_return">
39 <col class="functions_name">
40 </colgroup>
41 <tbody>
42 <tr>
43 <td class="function_type">
44 <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="returnvalue">cairo_font_face_t</span></a> *
45 </td>
46 <td class="function_name">
47 <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-reference" title="cairo_font_face_reference ()">cairo_font_face_reference</a> <span class="c_punctuation">()</span>
48 </td>
49 </tr>
50 <tr>
51 <td class="function_type">
52 <span class="returnvalue">void</span>
53 </td>
54 <td class="function_name">
55 <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-destroy" title="cairo_font_face_destroy ()">cairo_font_face_destroy</a> <span class="c_punctuation">()</span>
56 </td>
57 </tr>
58 <tr>
59 <td class="function_type">
60 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
61 </td>
62 <td class="function_name">
63 <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-status" title="cairo_font_face_status ()">cairo_font_face_status</a> <span class="c_punctuation">()</span>
64 </td>
65 </tr>
66 <tr>
67 <td class="function_type">
68 <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-type-t" title="enum cairo_font_type_t"><span class="returnvalue">cairo_font_type_t</span></a>
69 </td>
70 <td class="function_name">
71 <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-get-type" title="cairo_font_face_get_type ()">cairo_font_face_get_type</a> <span class="c_punctuation">()</span>
72 </td>
73 </tr>
74 <tr>
75 <td class="function_type">unsigned <span class="returnvalue">int</span>
76 </td>
77 <td class="function_name">
78 <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-get-reference-count" title="cairo_font_face_get_reference_count ()">cairo_font_face_get_reference_count</a> <span class="c_punctuation">()</span>
79 </td>
80 </tr>
81 <tr>
82 <td class="function_type">
83 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
84 </td>
85 <td class="function_name">
86 <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-set-user-data" title="cairo_font_face_set_user_data ()">cairo_font_face_set_user_data</a> <span class="c_punctuation">()</span>
87 </td>
88 </tr>
89 <tr>
90 <td class="function_type">
91 <span class="returnvalue">void</span> *
92 </td>
93 <td class="function_name">
94 <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-get-user-data" title="cairo_font_face_get_user_data ()">cairo_font_face_get_user_data</a> <span class="c_punctuation">()</span>
95 </td>
96 </tr>
97 </tbody>
98 </table></div>
99 </div>
100 <div class="refsect1">
101 <a name="cairo-cairo-font-face-t.other"></a><h2>Types and Values</h2>
102 <div class="informaltable"><table class="informaltable" width="100%" border="0">
103 <colgroup>
104 <col width="150px" class="name">
105 <col class="description">
106 </colgroup>
107 <tbody>
108 <tr>
109 <td class="typedef_keyword">typedef</td>
110 <td class="function_name"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t">cairo_font_face_t</a></td>
111 </tr>
112 <tr>
113 <td class="datatype_keyword">enum</td>
114 <td class="function_name"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-type-t" title="enum cairo_font_type_t">cairo_font_type_t</a></td>
115 </tr>
116 </tbody>
117 </table></div>
118 </div>
119 <div class="refsect1">
120 <a name="cairo-cairo-font-face-t.description"></a><h2>Description</h2>
121 <p><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a> represents a particular font at a particular weight,
122 slant, and other characteristic but no size, transformation, or size.</p>
123 <p>Font faces are created using <em class="firstterm">font-backend</em>-specific
124 constructors, typically of the form
125 <code class="function">cairo_<span class="emphasis"><em>backend</em></span>_font_face_create()</code>,
126 or implicitly using the <em class="firstterm">toy</em> text API by way of
127 <a class="link" href="cairo-text.html#cairo-select-font-face" title="cairo_select_font_face ()"><code class="function">cairo_select_font_face()</code></a>. The resulting face can be accessed using
128 <a class="link" href="cairo-text.html#cairo-get-font-face" title="cairo_get_font_face ()"><code class="function">cairo_get_font_face()</code></a>.</p>
129 </div>
130 <div class="refsect1">
131 <a name="cairo-cairo-font-face-t.functions_details"></a><h2>Functions</h2>
132 <div class="refsect2">
133 <a name="cairo-font-face-reference"></a><h3>cairo_font_face_reference ()</h3>
134 <pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="returnvalue">cairo_font_face_t</span></a> *
135 cairo_font_face_reference (<em class="parameter"><code><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a> *font_face</code></em>);</pre>
136 <p>Increases the reference count on <em class="parameter"><code>font_face</code></em>
137 by one. This prevents
138 <em class="parameter"><code>font_face</code></em>
139 from being destroyed until a matching call to
140 <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-destroy" title="cairo_font_face_destroy ()"><code class="function">cairo_font_face_destroy()</code></a> is made.</p>
141 <p>Use <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-get-reference-count" title="cairo_font_face_get_reference_count ()"><code class="function">cairo_font_face_get_reference_count()</code></a> to get the number of
142 references to a <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a>.</p>
143 <div class="refsect3">
144 <a name="cairo-font-face-reference.parameters"></a><h4>Parameters</h4>
145 <div class="informaltable"><table class="informaltable" width="100%" border="0">
146 <colgroup>
147 <col width="150px" class="parameters_name">
148 <col class="parameters_description">
149 <col width="200px" class="parameters_annotations">
150 </colgroup>
151 <tbody><tr>
152 <td class="parameter_name"><p>font_face</p></td>
153 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a>, (may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in which case this
154 function does nothing).</p></td>
155 <td class="parameter_annotations"> </td>
156 </tr></tbody>
157 </table></div>
158 </div>
159 <div class="refsect3">
160 <a name="cairo-font-face-reference.returns"></a><h4>Returns</h4>
161 <p> the referenced <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a>.</p>
162 </div>
163 <p class="since">Since: 1.0</p>
164 </div>
165 <hr>
166 <div class="refsect2">
167 <a name="cairo-font-face-destroy"></a><h3>cairo_font_face_destroy ()</h3>
168 <pre class="programlisting"><span class="returnvalue">void</span>
169 cairo_font_face_destroy (<em class="parameter"><code><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a> *font_face</code></em>);</pre>
170 <p>Decreases the reference count on <em class="parameter"><code>font_face</code></em>
171 by one. If the result
172 is zero, then <em class="parameter"><code>font_face</code></em>
173 and all associated resources are freed.
174 See <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-reference" title="cairo_font_face_reference ()"><code class="function">cairo_font_face_reference()</code></a>.</p>
175 <div class="refsect3">
176 <a name="cairo-font-face-destroy.parameters"></a><h4>Parameters</h4>
177 <div class="informaltable"><table class="informaltable" width="100%" border="0">
178 <colgroup>
179 <col width="150px" class="parameters_name">
180 <col class="parameters_description">
181 <col width="200px" class="parameters_annotations">
182 </colgroup>
183 <tbody><tr>
184 <td class="parameter_name"><p>font_face</p></td>
185 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a></p></td>
186 <td class="parameter_annotations"> </td>
187 </tr></tbody>
188 </table></div>
189 </div>
190 <p class="since">Since: 1.0</p>
191 </div>
192 <hr>
193 <div class="refsect2">
194 <a name="cairo-font-face-status"></a><h3>cairo_font_face_status ()</h3>
195 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
196 cairo_font_face_status (<em class="parameter"><code><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a> *font_face</code></em>);</pre>
197 <p>Checks whether an error has previously occurred for this
198 font face</p>
199 <div class="refsect3">
200 <a name="cairo-font-face-status.parameters"></a><h4>Parameters</h4>
201 <div class="informaltable"><table class="informaltable" width="100%" border="0">
202 <colgroup>
203 <col width="150px" class="parameters_name">
204 <col class="parameters_description">
205 <col width="200px" class="parameters_annotations">
206 </colgroup>
207 <tbody><tr>
208 <td class="parameter_name"><p>font_face</p></td>
209 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a></p></td>
210 <td class="parameter_annotations"> </td>
211 </tr></tbody>
212 </table></div>
213 </div>
214 <div class="refsect3">
215 <a name="cairo-font-face-status.returns"></a><h4>Returns</h4>
216 <p> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or another error such as
217 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.</p>
218 </div>
219 <p class="since">Since: 1.0</p>
220 </div>
221 <hr>
222 <div class="refsect2">
223 <a name="cairo-font-face-get-type"></a><h3>cairo_font_face_get_type ()</h3>
224 <pre class="programlisting"><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-type-t" title="enum cairo_font_type_t"><span class="returnvalue">cairo_font_type_t</span></a>
225 cairo_font_face_get_type (<em class="parameter"><code><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a> *font_face</code></em>);</pre>
226 <p>This function returns the type of the backend used to create
227 a font face. See <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-type-t" title="enum cairo_font_type_t"><span class="type">cairo_font_type_t</span></a> for available types.</p>
228 <div class="refsect3">
229 <a name="cairo-font-face-get-type.parameters"></a><h4>Parameters</h4>
230 <div class="informaltable"><table class="informaltable" width="100%" border="0">
231 <colgroup>
232 <col width="150px" class="parameters_name">
233 <col class="parameters_description">
234 <col width="200px" class="parameters_annotations">
235 </colgroup>
236 <tbody><tr>
237 <td class="parameter_name"><p>font_face</p></td>
238 <td class="parameter_description"><p>a font face</p></td>
239 <td class="parameter_annotations"> </td>
240 </tr></tbody>
241 </table></div>
242 </div>
243 <div class="refsect3">
244 <a name="cairo-font-face-get-type.returns"></a><h4>Returns</h4>
245 <p> The type of <em class="parameter"><code>font_face</code></em>
246 .</p>
247 </div>
248 <p class="since">Since: 1.2</p>
249 </div>
250 <hr>
251 <div class="refsect2">
252 <a name="cairo-font-face-get-reference-count"></a><h3>cairo_font_face_get_reference_count ()</h3>
253 <pre class="programlisting">unsigned <span class="returnvalue">int</span>
254 cairo_font_face_get_reference_count (<em class="parameter"><code><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a> *font_face</code></em>);</pre>
255 <p>Returns the current reference count of <em class="parameter"><code>font_face</code></em>
256 .</p>
257 <div class="refsect3">
258 <a name="cairo-font-face-get-reference-count.parameters"></a><h4>Parameters</h4>
259 <div class="informaltable"><table class="informaltable" width="100%" border="0">
260 <colgroup>
261 <col width="150px" class="parameters_name">
262 <col class="parameters_description">
263 <col width="200px" class="parameters_annotations">
264 </colgroup>
265 <tbody><tr>
266 <td class="parameter_name"><p>font_face</p></td>
267 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a></p></td>
268 <td class="parameter_annotations"> </td>
269 </tr></tbody>
270 </table></div>
271 </div>
272 <div class="refsect3">
273 <a name="cairo-font-face-get-reference-count.returns"></a><h4>Returns</h4>
274 <p> the current reference count of <em class="parameter"><code>font_face</code></em>
275 . If the
276 object is a nil object, 0 will be returned.</p>
277 </div>
278 <p class="since">Since: 1.4</p>
279 </div>
280 <hr>
281 <div class="refsect2">
282 <a name="cairo-font-face-set-user-data"></a><h3>cairo_font_face_set_user_data ()</h3>
283 <pre class="programlisting"><a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
284 cairo_font_face_set_user_data (<em class="parameter"><code><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a> *font_face</code></em>,
285 <em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> *key</code></em>,
286 <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
287 <em class="parameter"><code><a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> destroy</code></em>);</pre>
288 <p>Attach user data to <em class="parameter"><code>font_face</code></em>
289 . To remove user data from a font face,
290 call this function with the key that was used to set it and <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
291 for <em class="parameter"><code>data</code></em>
292 .</p>
293 <div class="refsect3">
294 <a name="cairo-font-face-set-user-data.parameters"></a><h4>Parameters</h4>
295 <div class="informaltable"><table class="informaltable" width="100%" border="0">
296 <colgroup>
297 <col width="150px" class="parameters_name">
298 <col class="parameters_description">
299 <col width="200px" class="parameters_annotations">
300 </colgroup>
301 <tbody>
302 <tr>
303 <td class="parameter_name"><p>font_face</p></td>
304 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a></p></td>
305 <td class="parameter_annotations"> </td>
306 </tr>
307 <tr>
308 <td class="parameter_name"><p>key</p></td>
309 <td class="parameter_description"><p>the address of a <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> to attach the user data to</p></td>
310 <td class="parameter_annotations"> </td>
311 </tr>
312 <tr>
313 <td class="parameter_name"><p>user_data</p></td>
314 <td class="parameter_description"><p>the user data to attach to the font face</p></td>
315 <td class="parameter_annotations"> </td>
316 </tr>
317 <tr>
318 <td class="parameter_name"><p>destroy</p></td>
319 <td class="parameter_description"><p>a <a class="link" href="cairo-Types.html#cairo-destroy-func-t" title="cairo_destroy_func_t ()"><span class="type">cairo_destroy_func_t</span></a> which will be called when the
320 font face is destroyed or when new user data is attached using the
321 same key.</p></td>
322 <td class="parameter_annotations"> </td>
323 </tr>
324 </tbody>
325 </table></div>
326 </div>
327 <div class="refsect3">
328 <a name="cairo-font-face-set-user-data.returns"></a><h4>Returns</h4>
329 <p> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> or <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a> if a
330 slot could not be allocated for the user data.</p>
331 </div>
332 <p class="since">Since: 1.0</p>
333 </div>
334 <hr>
335 <div class="refsect2">
336 <a name="cairo-font-face-get-user-data"></a><h3>cairo_font_face_get_user_data ()</h3>
337 <pre class="programlisting"><span class="returnvalue">void</span> *
338 cairo_font_face_get_user_data (<em class="parameter"><code><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a> *font_face</code></em>,
339 <em class="parameter"><code>const <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> *key</code></em>);</pre>
340 <p>Return user data previously attached to <em class="parameter"><code>font_face</code></em>
341 using the specified
342 key. If no user data has been attached with the given key this
343 function returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
344 <div class="refsect3">
345 <a name="cairo-font-face-get-user-data.parameters"></a><h4>Parameters</h4>
346 <div class="informaltable"><table class="informaltable" width="100%" border="0">
347 <colgroup>
348 <col width="150px" class="parameters_name">
349 <col class="parameters_description">
350 <col width="200px" class="parameters_annotations">
351 </colgroup>
352 <tbody>
353 <tr>
354 <td class="parameter_name"><p>font_face</p></td>
355 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a></p></td>
356 <td class="parameter_annotations"> </td>
357 </tr>
358 <tr>
359 <td class="parameter_name"><p>key</p></td>
360 <td class="parameter_description"><p>the address of the <a class="link" href="cairo-Types.html#cairo-user-data-key-t" title="cairo_user_data_key_t"><span class="type">cairo_user_data_key_t</span></a> the user data was
361 attached to</p></td>
362 <td class="parameter_annotations"> </td>
363 </tr>
364 </tbody>
365 </table></div>
366 </div>
367 <div class="refsect3">
368 <a name="cairo-font-face-get-user-data.returns"></a><h4>Returns</h4>
369 <p> the user data previously attached or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
370 </div>
371 <p class="since">Since: 1.0</p>
372 </div>
373 </div>
374 <div class="refsect1">
375 <a name="cairo-cairo-font-face-t.other_details"></a><h2>Types and Values</h2>
376 <div class="refsect2">
377 <a name="cairo-font-face-t"></a><h3>cairo_font_face_t</h3>
378 <pre class="programlisting">typedef struct _cairo_font_face cairo_font_face_t;
379 </pre>
380 <p>A <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a> specifies all aspects of a font other
381 than the size or font matrix (a font matrix is used to distort
382 a font by shearing it or scaling it unequally in the two
383 directions) . A font face can be set on a <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> by using
384 <a class="link" href="cairo-text.html#cairo-set-font-face" title="cairo_set_font_face ()"><code class="function">cairo_set_font_face()</code></a>; the size and font matrix are set with
385 <a class="link" href="cairo-text.html#cairo-set-font-size" title="cairo_set_font_size ()"><code class="function">cairo_set_font_size()</code></a> and <a class="link" href="cairo-text.html#cairo-set-font-matrix" title="cairo_set_font_matrix ()"><code class="function">cairo_set_font_matrix()</code></a>.</p>
386 <p>There are various types of font faces, depending on the
387 <em class="firstterm">font backend</em> they use. The type of a
388 font face can be queried using <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-get-type" title="cairo_font_face_get_type ()"><code class="function">cairo_font_face_get_type()</code></a>.</p>
389 <p>Memory management of <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a> is done with
390 <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-reference" title="cairo_font_face_reference ()"><code class="function">cairo_font_face_reference()</code></a> and <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-destroy" title="cairo_font_face_destroy ()"><code class="function">cairo_font_face_destroy()</code></a>.</p>
391 <p class="since">Since: 1.0</p>
392 </div>
393 <hr>
394 <div class="refsect2">
395 <a name="cairo-font-type-t"></a><h3>enum cairo_font_type_t</h3>
396 <p><a class="link" href="cairo-cairo-font-face-t.html#cairo-font-type-t" title="enum cairo_font_type_t"><span class="type">cairo_font_type_t</span></a> is used to describe the type of a given font
397 face or scaled font. The font types are also known as "font
398 backends" within cairo.</p>
399 <p>The type of a font face is determined by the function used to
400 create it, which will generally be of the form
401 <code class="function">cairo_<span class="emphasis"><em>type</em></span>_font_face_create()</code>.
402 The font face type can be queried with <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-get-type" title="cairo_font_face_get_type ()"><code class="function">cairo_font_face_get_type()</code></a></p>
403 <p>The various <a class="link" href="cairo-cairo-font-face-t.html#cairo-font-face-t" title="cairo_font_face_t"><span class="type">cairo_font_face_t</span></a> functions can be used with a font face
404 of any type.</p>
405 <p>The type of a scaled font is determined by the type of the font
406 face passed to <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()"><code class="function">cairo_scaled_font_create()</code></a>. The scaled font type can
407 be queried with <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-type" title="cairo_scaled_font_get_type ()"><code class="function">cairo_scaled_font_get_type()</code></a></p>
408 <p>The various <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a> functions can be used with scaled
409 fonts of any type, but some font backends also provide
410 type-specific functions that must only be called with a scaled font
411 of the appropriate type. These functions have names that begin with
412 <code class="function">cairo_<span class="emphasis"><em>type</em></span>_scaled_font()</code>
413 such as <a class="link" href="cairo-FreeType-Fonts.html#cairo-ft-scaled-font-lock-face" title="cairo_ft_scaled_font_lock_face ()"><code class="function">cairo_ft_scaled_font_lock_face()</code></a>.</p>
414 <p>The behavior of calling a type-specific function with a scaled font
415 of the wrong type is undefined.</p>
416 <p>New entries may be added in future versions.</p>
417 <div class="refsect3">
418 <a name="cairo-font-type-t.members"></a><h4>Members</h4>
419 <div class="informaltable"><table class="informaltable" width="100%" border="0">
420 <colgroup>
421 <col width="300px" class="enum_members_name">
422 <col class="enum_members_description">
423 <col width="200px" class="enum_members_annotations">
424 </colgroup>
425 <tbody>
426 <tr>
427 <td class="enum_member_name"><p><a name="CAIRO-FONT-TYPE-TOY:CAPS"></a>CAIRO_FONT_TYPE_TOY</p></td>
428 <td class="enum_member_description">
429 <p>The font was created using cairo's toy font api (Since: 1.2)</p>
430 </td>
431 <td class="enum_member_annotations"> </td>
432 </tr>
433 <tr>
434 <td class="enum_member_name"><p><a name="CAIRO-FONT-TYPE-FT:CAPS"></a>CAIRO_FONT_TYPE_FT</p></td>
435 <td class="enum_member_description">
436 <p>The font is of type FreeType (Since: 1.2)</p>
437 </td>
438 <td class="enum_member_annotations"> </td>
439 </tr>
440 <tr>
441 <td class="enum_member_name"><p><a name="CAIRO-FONT-TYPE-WIN32:CAPS"></a>CAIRO_FONT_TYPE_WIN32</p></td>
442 <td class="enum_member_description">
443 <p>The font is of type Win32 (Since: 1.2)</p>
444 </td>
445 <td class="enum_member_annotations"> </td>
446 </tr>
447 <tr>
448 <td class="enum_member_name"><p><a name="CAIRO-FONT-TYPE-QUARTZ:CAPS"></a>CAIRO_FONT_TYPE_QUARTZ</p></td>
449 <td class="enum_member_description">
450 <p>The font is of type Quartz (Since: 1.6, in 1.2 and
451 1.4 it was named CAIRO_FONT_TYPE_ATSUI)</p>
452 </td>
453 <td class="enum_member_annotations"> </td>
454 </tr>
455 <tr>
456 <td class="enum_member_name"><p><a name="CAIRO-FONT-TYPE-USER:CAPS"></a>CAIRO_FONT_TYPE_USER</p></td>
457 <td class="enum_member_description">
458 <p>The font was create using cairo's user font api (Since: 1.8)</p>
459 </td>
460 <td class="enum_member_annotations"> </td>
461 </tr>
462 </tbody>
463 </table></div>
464 </div>
465 <p class="since">Since: 1.2</p>
466 </div>
467 </div>
468 <div class="refsect1">
469 <a name="cairo-cairo-font-face-t.see-also"></a><h2>See Also</h2>
470 <p><a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="type">cairo_scaled_font_t</span></a></p>
471 </div>
472 </div>
473 <div class="footer">
474 <hr>Generated by GTK-Doc V1.27</div>
475 </body>
476 </html>