comparison CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/gtk-doc/html/cairo/cairo-cairo-scaled-font-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_scaled_font_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-cairo-font-face-t.html" title="cairo_font_face_t">
10 <link rel="next" href="cairo-cairo-font-options-t.html" title="cairo_font_options_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-scaled-font-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-cairo-font-face-t.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
23 <td><a accesskey="n" href="cairo-cairo-font-options-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-scaled-font-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-scaled-font-t.top_of_page"></a>cairo_scaled_font_t</span></h2>
30 <p>cairo_scaled_font_t — Font face at particular size and options</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-scaled-font-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-scaled-font-t.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="returnvalue">cairo_scaled_font_t</span></a> *
45 </td>
46 <td class="function_name">
47 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-create" title="cairo_scaled_font_create ()">cairo_scaled_font_create</a> <span class="c_punctuation">()</span>
48 </td>
49 </tr>
50 <tr>
51 <td class="function_type">
52 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="returnvalue">cairo_scaled_font_t</span></a> *
53 </td>
54 <td class="function_name">
55 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-reference" title="cairo_scaled_font_reference ()">cairo_scaled_font_reference</a> <span class="c_punctuation">()</span>
56 </td>
57 </tr>
58 <tr>
59 <td class="function_type">
60 <span class="returnvalue">void</span>
61 </td>
62 <td class="function_name">
63 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-destroy" title="cairo_scaled_font_destroy ()">cairo_scaled_font_destroy</a> <span class="c_punctuation">()</span>
64 </td>
65 </tr>
66 <tr>
67 <td class="function_type">
68 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
69 </td>
70 <td class="function_name">
71 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-status" title="cairo_scaled_font_status ()">cairo_scaled_font_status</a> <span class="c_punctuation">()</span>
72 </td>
73 </tr>
74 <tr>
75 <td class="function_type">
76 <span class="returnvalue">void</span>
77 </td>
78 <td class="function_name">
79 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-extents" title="cairo_scaled_font_extents ()">cairo_scaled_font_extents</a> <span class="c_punctuation">()</span>
80 </td>
81 </tr>
82 <tr>
83 <td class="function_type">
84 <span class="returnvalue">void</span>
85 </td>
86 <td class="function_name">
87 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-text-extents" title="cairo_scaled_font_text_extents ()">cairo_scaled_font_text_extents</a> <span class="c_punctuation">()</span>
88 </td>
89 </tr>
90 <tr>
91 <td class="function_type">
92 <span class="returnvalue">void</span>
93 </td>
94 <td class="function_name">
95 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-glyph-extents" title="cairo_scaled_font_glyph_extents ()">cairo_scaled_font_glyph_extents</a> <span class="c_punctuation">()</span>
96 </td>
97 </tr>
98 <tr>
99 <td class="function_type">
100 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
101 </td>
102 <td class="function_name">
103 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-text-to-glyphs" title="cairo_scaled_font_text_to_glyphs ()">cairo_scaled_font_text_to_glyphs</a> <span class="c_punctuation">()</span>
104 </td>
105 </tr>
106 <tr>
107 <td class="function_type">
108 <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> *
109 </td>
110 <td class="function_name">
111 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-font-face" title="cairo_scaled_font_get_font_face ()">cairo_scaled_font_get_font_face</a> <span class="c_punctuation">()</span>
112 </td>
113 </tr>
114 <tr>
115 <td class="function_type">
116 <span class="returnvalue">void</span>
117 </td>
118 <td class="function_name">
119 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-font-options" title="cairo_scaled_font_get_font_options ()">cairo_scaled_font_get_font_options</a> <span class="c_punctuation">()</span>
120 </td>
121 </tr>
122 <tr>
123 <td class="function_type">
124 <span class="returnvalue">void</span>
125 </td>
126 <td class="function_name">
127 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-font-matrix" title="cairo_scaled_font_get_font_matrix ()">cairo_scaled_font_get_font_matrix</a> <span class="c_punctuation">()</span>
128 </td>
129 </tr>
130 <tr>
131 <td class="function_type">
132 <span class="returnvalue">void</span>
133 </td>
134 <td class="function_name">
135 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-ctm" title="cairo_scaled_font_get_ctm ()">cairo_scaled_font_get_ctm</a> <span class="c_punctuation">()</span>
136 </td>
137 </tr>
138 <tr>
139 <td class="function_type">
140 <span class="returnvalue">void</span>
141 </td>
142 <td class="function_name">
143 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-scale-matrix" title="cairo_scaled_font_get_scale_matrix ()">cairo_scaled_font_get_scale_matrix</a> <span class="c_punctuation">()</span>
144 </td>
145 </tr>
146 <tr>
147 <td class="function_type">
148 <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>
149 </td>
150 <td class="function_name">
151 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-type" title="cairo_scaled_font_get_type ()">cairo_scaled_font_get_type</a> <span class="c_punctuation">()</span>
152 </td>
153 </tr>
154 <tr>
155 <td class="function_type">unsigned <span class="returnvalue">int</span>
156 </td>
157 <td class="function_name">
158 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-reference-count" title="cairo_scaled_font_get_reference_count ()">cairo_scaled_font_get_reference_count</a> <span class="c_punctuation">()</span>
159 </td>
160 </tr>
161 <tr>
162 <td class="function_type">
163 <a class="link" href="cairo-Error-handling.html#cairo-status-t" title="enum cairo_status_t"><span class="returnvalue">cairo_status_t</span></a>
164 </td>
165 <td class="function_name">
166 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-set-user-data" title="cairo_scaled_font_set_user_data ()">cairo_scaled_font_set_user_data</a> <span class="c_punctuation">()</span>
167 </td>
168 </tr>
169 <tr>
170 <td class="function_type">
171 <span class="returnvalue">void</span> *
172 </td>
173 <td class="function_name">
174 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-user-data" title="cairo_scaled_font_get_user_data ()">cairo_scaled_font_get_user_data</a> <span class="c_punctuation">()</span>
175 </td>
176 </tr>
177 </tbody>
178 </table></div>
179 </div>
180 <div class="refsect1">
181 <a name="cairo-cairo-scaled-font-t.other"></a><h2>Types and Values</h2>
182 <div class="informaltable"><table class="informaltable" width="100%" border="0">
183 <colgroup>
184 <col width="150px" class="name">
185 <col class="description">
186 </colgroup>
187 <tbody>
188 <tr>
189 <td class="typedef_keyword">typedef</td>
190 <td class="function_name"><a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-t" title="cairo_scaled_font_t">cairo_scaled_font_t</a></td>
191 </tr>
192 <tr>
193 <td class="datatype_keyword"> </td>
194 <td class="function_name"><a class="link" href="cairo-cairo-scaled-font-t.html#cairo-font-extents-t" title="cairo_font_extents_t">cairo_font_extents_t</a></td>
195 </tr>
196 <tr>
197 <td class="datatype_keyword"> </td>
198 <td class="function_name"><a class="link" href="cairo-cairo-scaled-font-t.html#cairo-text-extents-t" title="cairo_text_extents_t">cairo_text_extents_t</a></td>
199 </tr>
200 </tbody>
201 </table></div>
202 </div>
203 <div class="refsect1">
204 <a name="cairo-cairo-scaled-font-t.description"></a><h2>Description</h2>
205 <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> represents a realization of a font face at a particular
206 size and transformation and a certain set of font options.</p>
207 </div>
208 <div class="refsect1">
209 <a name="cairo-cairo-scaled-font-t.functions_details"></a><h2>Functions</h2>
210 <div class="refsect2">
211 <a name="cairo-scaled-font-create"></a><h3>cairo_scaled_font_create ()</h3>
212 <pre class="programlisting"><a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="returnvalue">cairo_scaled_font_t</span></a> *
213 cairo_scaled_font_create (<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>,
214 <em class="parameter"><code>const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *font_matrix</code></em>,
215 <em class="parameter"><code>const <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *ctm</code></em>,
216 <em class="parameter"><code>const <a class="link" href="cairo-cairo-font-options-t.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a> *options</code></em>);</pre>
217 <p>Creates a <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> object from a font face and matrices that
218 describe the size of the font and the environment in which it will
219 be used.</p>
220 <div class="refsect3">
221 <a name="cairo-scaled-font-create.parameters"></a><h4>Parameters</h4>
222 <div class="informaltable"><table class="informaltable" width="100%" border="0">
223 <colgroup>
224 <col width="150px" class="parameters_name">
225 <col class="parameters_description">
226 <col width="200px" class="parameters_annotations">
227 </colgroup>
228 <tbody>
229 <tr>
230 <td class="parameter_name"><p>font_face</p></td>
231 <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>
232 <td class="parameter_annotations"> </td>
233 </tr>
234 <tr>
235 <td class="parameter_name"><p>font_matrix</p></td>
236 <td class="parameter_description"><p>font space to user space transformation matrix for the
237 font. In the simplest case of a N point font, this matrix is
238 just a scale by N, but it can also be used to shear the font
239 or stretch it unequally along the two axes. See
240 <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></td>
241 <td class="parameter_annotations"> </td>
242 </tr>
243 <tr>
244 <td class="parameter_name"><p>ctm</p></td>
245 <td class="parameter_description"><p>user to device transformation matrix with which the font will
246 be used.</p></td>
247 <td class="parameter_annotations"> </td>
248 </tr>
249 <tr>
250 <td class="parameter_name"><p>options</p></td>
251 <td class="parameter_description"><p>options to use when getting metrics for the font and
252 rendering with it.</p></td>
253 <td class="parameter_annotations"> </td>
254 </tr>
255 </tbody>
256 </table></div>
257 </div>
258 <div class="refsect3">
259 <a name="cairo-scaled-font-create.returns"></a><h4>Returns</h4>
260 <p> a newly created <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>. Destroy with
261 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-destroy" title="cairo_scaled_font_destroy ()"><code class="function">cairo_scaled_font_destroy()</code></a></p>
262 </div>
263 <p class="since">Since: 1.0</p>
264 </div>
265 <hr>
266 <div class="refsect2">
267 <a name="cairo-scaled-font-reference"></a><h3>cairo_scaled_font_reference ()</h3>
268 <pre class="programlisting"><a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-t" title="cairo_scaled_font_t"><span class="returnvalue">cairo_scaled_font_t</span></a> *
269 cairo_scaled_font_reference (<em class="parameter"><code><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> *scaled_font</code></em>);</pre>
270 <p>Increases the reference count on <em class="parameter"><code>scaled_font</code></em>
271 by one. This prevents
272 <em class="parameter"><code>scaled_font</code></em>
273 from being destroyed until a matching call to
274 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-destroy" title="cairo_scaled_font_destroy ()"><code class="function">cairo_scaled_font_destroy()</code></a> is made.</p>
275 <p>Use <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-get-reference-count" title="cairo_scaled_font_get_reference_count ()"><code class="function">cairo_scaled_font_get_reference_count()</code></a> to get the number of
276 references to a <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>
277 <div class="refsect3">
278 <a name="cairo-scaled-font-reference.parameters"></a><h4>Parameters</h4>
279 <div class="informaltable"><table class="informaltable" width="100%" border="0">
280 <colgroup>
281 <col width="150px" class="parameters_name">
282 <col class="parameters_description">
283 <col width="200px" class="parameters_annotations">
284 </colgroup>
285 <tbody><tr>
286 <td class="parameter_name"><p>scaled_font</p></td>
287 <td class="parameter_description"><p>a <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>, (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
288 this function does nothing)</p></td>
289 <td class="parameter_annotations"> </td>
290 </tr></tbody>
291 </table></div>
292 </div>
293 <div class="refsect3">
294 <a name="cairo-scaled-font-reference.returns"></a><h4>Returns</h4>
295 <p> the referenced <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>
296 </div>
297 <p class="since">Since: 1.0</p>
298 </div>
299 <hr>
300 <div class="refsect2">
301 <a name="cairo-scaled-font-destroy"></a><h3>cairo_scaled_font_destroy ()</h3>
302 <pre class="programlisting"><span class="returnvalue">void</span>
303 cairo_scaled_font_destroy (<em class="parameter"><code><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> *scaled_font</code></em>);</pre>
304 <p>Decreases the reference count on <em class="parameter"><code>font</code></em>
305 by one. If the result
306 is zero, then <em class="parameter"><code>font</code></em>
307 and all associated resources are freed.
308 See <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-reference" title="cairo_scaled_font_reference ()"><code class="function">cairo_scaled_font_reference()</code></a>.</p>
309 <div class="refsect3">
310 <a name="cairo-scaled-font-destroy.parameters"></a><h4>Parameters</h4>
311 <div class="informaltable"><table class="informaltable" width="100%" border="0">
312 <colgroup>
313 <col width="150px" class="parameters_name">
314 <col class="parameters_description">
315 <col width="200px" class="parameters_annotations">
316 </colgroup>
317 <tbody><tr>
318 <td class="parameter_name"><p>scaled_font</p></td>
319 <td class="parameter_description"><p>a <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></td>
320 <td class="parameter_annotations"> </td>
321 </tr></tbody>
322 </table></div>
323 </div>
324 <p class="since">Since: 1.0</p>
325 </div>
326 <hr>
327 <div class="refsect2">
328 <a name="cairo-scaled-font-status"></a><h3>cairo_scaled_font_status ()</h3>
329 <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>
330 cairo_scaled_font_status (<em class="parameter"><code><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> *scaled_font</code></em>);</pre>
331 <p>Checks whether an error has previously occurred for this
332 scaled_font.</p>
333 <div class="refsect3">
334 <a name="cairo-scaled-font-status.parameters"></a><h4>Parameters</h4>
335 <div class="informaltable"><table class="informaltable" width="100%" border="0">
336 <colgroup>
337 <col width="150px" class="parameters_name">
338 <col class="parameters_description">
339 <col width="200px" class="parameters_annotations">
340 </colgroup>
341 <tbody><tr>
342 <td class="parameter_name"><p>scaled_font</p></td>
343 <td class="parameter_description"><p>a <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></td>
344 <td class="parameter_annotations"> </td>
345 </tr></tbody>
346 </table></div>
347 </div>
348 <div class="refsect3">
349 <a name="cairo-scaled-font-status.returns"></a><h4>Returns</h4>
350 <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
351 <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-NO-MEMORY:CAPS"><code class="literal">CAIRO_STATUS_NO_MEMORY</code></a>.</p>
352 </div>
353 <p class="since">Since: 1.0</p>
354 </div>
355 <hr>
356 <div class="refsect2">
357 <a name="cairo-scaled-font-extents"></a><h3>cairo_scaled_font_extents ()</h3>
358 <pre class="programlisting"><span class="returnvalue">void</span>
359 cairo_scaled_font_extents (<em class="parameter"><code><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> *scaled_font</code></em>,
360 <em class="parameter"><code><a class="link" href="cairo-cairo-scaled-font-t.html#cairo-font-extents-t" title="cairo_font_extents_t"><span class="type">cairo_font_extents_t</span></a> *extents</code></em>);</pre>
361 <p>Gets the metrics for a <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>
362 <div class="refsect3">
363 <a name="cairo-scaled-font-extents.parameters"></a><h4>Parameters</h4>
364 <div class="informaltable"><table class="informaltable" width="100%" border="0">
365 <colgroup>
366 <col width="150px" class="parameters_name">
367 <col class="parameters_description">
368 <col width="200px" class="parameters_annotations">
369 </colgroup>
370 <tbody>
371 <tr>
372 <td class="parameter_name"><p>scaled_font</p></td>
373 <td class="parameter_description"><p>a <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></td>
374 <td class="parameter_annotations"> </td>
375 </tr>
376 <tr>
377 <td class="parameter_name"><p>extents</p></td>
378 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-font-extents-t" title="cairo_font_extents_t"><span class="type">cairo_font_extents_t</span></a> which to store the retrieved extents.</p></td>
379 <td class="parameter_annotations"> </td>
380 </tr>
381 </tbody>
382 </table></div>
383 </div>
384 <p class="since">Since: 1.0</p>
385 </div>
386 <hr>
387 <div class="refsect2">
388 <a name="cairo-scaled-font-text-extents"></a><h3>cairo_scaled_font_text_extents ()</h3>
389 <pre class="programlisting"><span class="returnvalue">void</span>
390 cairo_scaled_font_text_extents (<em class="parameter"><code><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> *scaled_font</code></em>,
391 <em class="parameter"><code>const <span class="type">char</span> *utf8</code></em>,
392 <em class="parameter"><code><a class="link" href="cairo-cairo-scaled-font-t.html#cairo-text-extents-t" title="cairo_text_extents_t"><span class="type">cairo_text_extents_t</span></a> *extents</code></em>);</pre>
393 <p>Gets the extents for a string of text. The extents describe a
394 user-space rectangle that encloses the "inked" portion of the text
395 drawn at the origin (0,0) (as it would be drawn by <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>
396 if the cairo graphics state were set to the same font_face,
397 font_matrix, ctm, and font_options as <em class="parameter"><code>scaled_font</code></em>
398 ). Additionally,
399 the x_advance and y_advance values indicate the amount by which the
400 current point would be advanced by <a class="link" href="cairo-text.html#cairo-show-text" title="cairo_show_text ()"><code class="function">cairo_show_text()</code></a>.</p>
401 <p>Note that whitespace characters do not directly contribute to the
402 size of the rectangle (extents.width and extents.height). They do
403 contribute indirectly by changing the position of non-whitespace
404 characters. In particular, trailing whitespace characters are
405 likely to not affect the size of the rectangle, though they will
406 affect the x_advance and y_advance values.</p>
407 <div class="refsect3">
408 <a name="cairo-scaled-font-text-extents.parameters"></a><h4>Parameters</h4>
409 <div class="informaltable"><table class="informaltable" width="100%" border="0">
410 <colgroup>
411 <col width="150px" class="parameters_name">
412 <col class="parameters_description">
413 <col width="200px" class="parameters_annotations">
414 </colgroup>
415 <tbody>
416 <tr>
417 <td class="parameter_name"><p>scaled_font</p></td>
418 <td class="parameter_description"><p>a <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></td>
419 <td class="parameter_annotations"> </td>
420 </tr>
421 <tr>
422 <td class="parameter_name"><p>utf8</p></td>
423 <td class="parameter_description"><p>a NUL-terminated string of text, encoded in UTF-8</p></td>
424 <td class="parameter_annotations"> </td>
425 </tr>
426 <tr>
427 <td class="parameter_name"><p>extents</p></td>
428 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-text-extents-t" title="cairo_text_extents_t"><span class="type">cairo_text_extents_t</span></a> which to store the retrieved extents.</p></td>
429 <td class="parameter_annotations"> </td>
430 </tr>
431 </tbody>
432 </table></div>
433 </div>
434 <p class="since">Since: 1.2</p>
435 </div>
436 <hr>
437 <div class="refsect2">
438 <a name="cairo-scaled-font-glyph-extents"></a><h3>cairo_scaled_font_glyph_extents ()</h3>
439 <pre class="programlisting"><span class="returnvalue">void</span>
440 cairo_scaled_font_glyph_extents (<em class="parameter"><code><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> *scaled_font</code></em>,
441 <em class="parameter"><code>const <a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t"><span class="type">cairo_glyph_t</span></a> *glyphs</code></em>,
442 <em class="parameter"><code><span class="type">int</span> num_glyphs</code></em>,
443 <em class="parameter"><code><a class="link" href="cairo-cairo-scaled-font-t.html#cairo-text-extents-t" title="cairo_text_extents_t"><span class="type">cairo_text_extents_t</span></a> *extents</code></em>);</pre>
444 <p>Gets the extents for an array of glyphs. The extents describe a
445 user-space rectangle that encloses the "inked" portion of the
446 glyphs, (as they would be drawn by <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a> if the cairo
447 graphics state were set to the same font_face, font_matrix, ctm,
448 and font_options as <em class="parameter"><code>scaled_font</code></em>
449 ). Additionally, the x_advance and
450 y_advance values indicate the amount by which the current point
451 would be advanced by <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a>.</p>
452 <p>Note that whitespace glyphs do not contribute to the size of the
453 rectangle (extents.width and extents.height).</p>
454 <div class="refsect3">
455 <a name="cairo-scaled-font-glyph-extents.parameters"></a><h4>Parameters</h4>
456 <div class="informaltable"><table class="informaltable" width="100%" border="0">
457 <colgroup>
458 <col width="150px" class="parameters_name">
459 <col class="parameters_description">
460 <col width="200px" class="parameters_annotations">
461 </colgroup>
462 <tbody>
463 <tr>
464 <td class="parameter_name"><p>scaled_font</p></td>
465 <td class="parameter_description"><p>a <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></td>
466 <td class="parameter_annotations"> </td>
467 </tr>
468 <tr>
469 <td class="parameter_name"><p>glyphs</p></td>
470 <td class="parameter_description"><p>an array of glyph IDs with X and Y offsets.</p></td>
471 <td class="parameter_annotations"> </td>
472 </tr>
473 <tr>
474 <td class="parameter_name"><p>num_glyphs</p></td>
475 <td class="parameter_description"><p>the number of glyphs in the <em class="parameter"><code>glyphs</code></em>
476 array</p></td>
477 <td class="parameter_annotations"> </td>
478 </tr>
479 <tr>
480 <td class="parameter_name"><p>extents</p></td>
481 <td class="parameter_description"><p>a <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-text-extents-t" title="cairo_text_extents_t"><span class="type">cairo_text_extents_t</span></a> which to store the retrieved extents.</p></td>
482 <td class="parameter_annotations"> </td>
483 </tr>
484 </tbody>
485 </table></div>
486 </div>
487 <p class="since">Since: 1.0</p>
488 </div>
489 <hr>
490 <div class="refsect2">
491 <a name="cairo-scaled-font-text-to-glyphs"></a><h3>cairo_scaled_font_text_to_glyphs ()</h3>
492 <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>
493 cairo_scaled_font_text_to_glyphs (<em class="parameter"><code><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> *scaled_font</code></em>,
494 <em class="parameter"><code><span class="type">double</span> x</code></em>,
495 <em class="parameter"><code><span class="type">double</span> y</code></em>,
496 <em class="parameter"><code>const <span class="type">char</span> *utf8</code></em>,
497 <em class="parameter"><code><span class="type">int</span> utf8_len</code></em>,
498 <em class="parameter"><code><a class="link" href="cairo-text.html#cairo-glyph-t" title="cairo_glyph_t"><span class="type">cairo_glyph_t</span></a> **glyphs</code></em>,
499 <em class="parameter"><code><span class="type">int</span> *num_glyphs</code></em>,
500 <em class="parameter"><code><a class="link" href="cairo-text.html#cairo-text-cluster-t" title="cairo_text_cluster_t"><span class="type">cairo_text_cluster_t</span></a> **clusters</code></em>,
501 <em class="parameter"><code><span class="type">int</span> *num_clusters</code></em>,
502 <em class="parameter"><code><a class="link" href="cairo-text.html#cairo-text-cluster-flags-t" title="enum cairo_text_cluster_flags_t"><span class="type">cairo_text_cluster_flags_t</span></a> *cluster_flags</code></em>);</pre>
503 <p>Converts UTF-8 text to an array of glyphs, optionally with cluster
504 mapping, that can be used to render later using <em class="parameter"><code>scaled_font</code></em>
505 .</p>
506 <p>If <em class="parameter"><code>glyphs</code></em>
507 initially points to a non-<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> value, that array is used
508 as a glyph buffer, and <em class="parameter"><code>num_glyphs</code></em>
509 should point to the number of glyph
510 entries available there. If the provided glyph array is too short for
511 the conversion, a new glyph array is allocated using <a class="link" href="cairo-text.html#cairo-glyph-allocate" title="cairo_glyph_allocate ()"><code class="function">cairo_glyph_allocate()</code></a>
512 and placed in <em class="parameter"><code>glyphs</code></em>
513 . Upon return, <em class="parameter"><code>num_glyphs</code></em>
514 always contains the
515 number of generated glyphs. If the value <em class="parameter"><code>glyphs</code></em>
516 points to has changed
517 after the call, the user is responsible for freeing the allocated glyph
518 array using <a class="link" href="cairo-text.html#cairo-glyph-free" title="cairo_glyph_free ()"><code class="function">cairo_glyph_free()</code></a>. This may happen even if the provided
519 array was large enough.</p>
520 <p>If <em class="parameter"><code>clusters</code></em>
521 is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, <em class="parameter"><code>num_clusters</code></em>
522 and <em class="parameter"><code>cluster_flags</code></em>
523 should not be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>,
524 and cluster mapping will be computed.
525 The semantics of how cluster array allocation works is similar to the glyph
526 array. That is,
527 if <em class="parameter"><code>clusters</code></em>
528 initially points to a non-<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> value, that array is used
529 as a cluster buffer, and <em class="parameter"><code>num_clusters</code></em>
530 should point to the number of cluster
531 entries available there. If the provided cluster array is too short for
532 the conversion, a new cluster array is allocated using <a class="link" href="cairo-text.html#cairo-text-cluster-allocate" title="cairo_text_cluster_allocate ()"><code class="function">cairo_text_cluster_allocate()</code></a>
533 and placed in <em class="parameter"><code>clusters</code></em>
534 . Upon return, <em class="parameter"><code>num_clusters</code></em>
535 always contains the
536 number of generated clusters. If the value <em class="parameter"><code>clusters</code></em>
537 points at has changed
538 after the call, the user is responsible for freeing the allocated cluster
539 array using <a class="link" href="cairo-text.html#cairo-text-cluster-free" title="cairo_text_cluster_free ()"><code class="function">cairo_text_cluster_free()</code></a>. This may happen even if the provided
540 array was large enough.</p>
541 <p>In the simplest case, <em class="parameter"><code>glyphs</code></em>
542 and <em class="parameter"><code>clusters</code></em>
543 can point to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> initially
544 and a suitable array will be allocated. In code:</p>
545 <div class="informalexample">
546 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
547 <tbody>
548 <tr>
549 <td class="listing_lines" align="right"><pre>1
550 2
551 3
552 4
553 5
554 6
555 7
556 8
557 9
558 10
559 11
560 12
561 13
562 14
563 15
564 16
565 17
566 18
567 19
568 20
569 21
570 22
571 23</pre></td>
572 <td class="listing_code"><pre class="programlisting">cairo_status_t status<span class="gtkdoc opt">;</span>
573
574 cairo_glyph_t <span class="gtkdoc opt">*</span>glyphs <span class="gtkdoc opt">=</span> NULL<span class="gtkdoc opt">;</span>
575 <span class="gtkdoc kwb">int</span> num_glyphs<span class="gtkdoc opt">;</span>
576 cairo_text_cluster_t <span class="gtkdoc opt">*</span>clusters <span class="gtkdoc opt">=</span> NULL<span class="gtkdoc opt">;</span>
577 <span class="gtkdoc kwb">int</span> num_clusters<span class="gtkdoc opt">;</span>
578 cairo_text_cluster_flags_t cluster_flags<span class="gtkdoc opt">;</span>
579
580 status <span class="gtkdoc opt">=</span> <span class="function"><a href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-text-to-glyphs">cairo_scaled_font_text_to_glyphs</a></span> <span class="gtkdoc opt">(</span>scaled_font<span class="gtkdoc opt">,</span>
581 x<span class="gtkdoc opt">,</span> y<span class="gtkdoc opt">,</span>
582 utf8<span class="gtkdoc opt">,</span> utf8_len<span class="gtkdoc opt">,</span>
583 <span class="gtkdoc opt">&amp;</span>glyphs<span class="gtkdoc opt">, &amp;</span>num_glyphs<span class="gtkdoc opt">,</span>
584 <span class="gtkdoc opt">&amp;</span>clusters<span class="gtkdoc opt">, &amp;</span>num_clusters<span class="gtkdoc opt">, &amp;</span>cluster_flags<span class="gtkdoc opt">);</span>
585
586 <span class="keyword">if</span> <span class="gtkdoc opt">(</span>status <span class="gtkdoc opt">==</span> CAIRO_STATUS_SUCCESS<span class="gtkdoc opt">) {</span>
587 <span class="function"><a href="cairo-text.html#cairo-show-text-glyphs">cairo_show_text_glyphs</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">,</span>
588 utf8<span class="gtkdoc opt">,</span> utf8_len<span class="gtkdoc opt">,</span>
589 glyphs<span class="gtkdoc opt">,</span> num_glyphs<span class="gtkdoc opt">,</span>
590 clusters<span class="gtkdoc opt">,</span> num_clusters<span class="gtkdoc opt">,</span> cluster_flags<span class="gtkdoc opt">);</span>
591
592 <span class="function"><a href="cairo-text.html#cairo-glyph-free">cairo_glyph_free</a></span> <span class="gtkdoc opt">(</span>glyphs<span class="gtkdoc opt">);</span>
593 <span class="function"><a href="cairo-text.html#cairo-text-cluster-free">cairo_text_cluster_free</a></span> <span class="gtkdoc opt">(</span>clusters<span class="gtkdoc opt">);</span>
594 <span class="gtkdoc opt">}</span></pre></td>
595 </tr>
596 </tbody>
597 </table>
598 </div>
599
600 <p>If no cluster mapping is needed:</p>
601 <div class="informalexample">
602 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
603 <tbody>
604 <tr>
605 <td class="listing_lines" align="right"><pre>1
606 2
607 3
608 4
609 5
610 6
611 7
612 8
613 9
614 10
615 11
616 12
617 13
618 14
619 15
620 16</pre></td>
621 <td class="listing_code"><pre class="programlisting">cairo_status_t status<span class="gtkdoc opt">;</span>
622
623 cairo_glyph_t <span class="gtkdoc opt">*</span>glyphs <span class="gtkdoc opt">=</span> NULL<span class="gtkdoc opt">;</span>
624 <span class="gtkdoc kwb">int</span> num_glyphs<span class="gtkdoc opt">;</span>
625
626 status <span class="gtkdoc opt">=</span> <span class="function"><a href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-text-to-glyphs">cairo_scaled_font_text_to_glyphs</a></span> <span class="gtkdoc opt">(</span>scaled_font<span class="gtkdoc opt">,</span>
627 x<span class="gtkdoc opt">,</span> y<span class="gtkdoc opt">,</span>
628 utf8<span class="gtkdoc opt">,</span> utf8_len<span class="gtkdoc opt">,</span>
629 <span class="gtkdoc opt">&amp;</span>glyphs<span class="gtkdoc opt">, &amp;</span>num_glyphs<span class="gtkdoc opt">,</span>
630 NULL<span class="gtkdoc opt">,</span> NULL<span class="gtkdoc opt">,</span>
631 NULL<span class="gtkdoc opt">);</span>
632
633 <span class="keyword">if</span> <span class="gtkdoc opt">(</span>status <span class="gtkdoc opt">==</span> CAIRO_STATUS_SUCCESS<span class="gtkdoc opt">) {</span>
634 <span class="function"><a href="cairo-text.html#cairo-show-glyphs">cairo_show_glyphs</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">,</span> glyphs<span class="gtkdoc opt">,</span> num_glyphs<span class="gtkdoc opt">);</span>
635 <span class="function"><a href="cairo-text.html#cairo-glyph-free">cairo_glyph_free</a></span> <span class="gtkdoc opt">(</span>glyphs<span class="gtkdoc opt">);</span>
636 <span class="gtkdoc opt">}</span></pre></td>
637 </tr>
638 </tbody>
639 </table>
640 </div>
641
642 <p>If stack-based glyph and cluster arrays are to be used for small
643 arrays:</p>
644 <div class="informalexample">
645 <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
646 <tbody>
647 <tr>
648 <td class="listing_lines" align="right"><pre>1
649 2
650 3
651 4
652 5
653 6
654 7
655 8
656 9
657 10
658 11
659 12
660 13
661 14
662 15
663 16
664 17
665 18
666 19
667 20
668 21
669 22
670 23
671 24
672 25
673 26
674 27</pre></td>
675 <td class="listing_code"><pre class="programlisting">cairo_status_t status<span class="gtkdoc opt">;</span>
676
677 cairo_glyph_t stack_glyphs<span class="gtkdoc opt">[</span><span class="number">40</span><span class="gtkdoc opt">];</span>
678 cairo_glyph_t <span class="gtkdoc opt">*</span>glyphs <span class="gtkdoc opt">=</span> stack_glyphs<span class="gtkdoc opt">;</span>
679 <span class="gtkdoc kwb">int</span> num_glyphs <span class="gtkdoc opt">=</span> <span class="keyword">sizeof</span> <span class="gtkdoc opt">(</span>stack_glyphs<span class="gtkdoc opt">) /</span> <span class="keyword">sizeof</span> <span class="gtkdoc opt">(</span>stack_glyphs<span class="gtkdoc opt">[</span><span class="number">0</span><span class="gtkdoc opt">]);</span>
680 cairo_text_cluster_t stack_clusters<span class="gtkdoc opt">[</span><span class="number">40</span><span class="gtkdoc opt">];</span>
681 cairo_text_cluster_t <span class="gtkdoc opt">*</span>clusters <span class="gtkdoc opt">=</span> stack_clusters<span class="gtkdoc opt">;</span>
682 <span class="gtkdoc kwb">int</span> num_clusters <span class="gtkdoc opt">=</span> <span class="keyword">sizeof</span> <span class="gtkdoc opt">(</span>stack_clusters<span class="gtkdoc opt">) /</span> <span class="keyword">sizeof</span> <span class="gtkdoc opt">(</span>stack_clusters<span class="gtkdoc opt">[</span><span class="number">0</span><span class="gtkdoc opt">]);</span>
683 cairo_text_cluster_flags_t cluster_flags<span class="gtkdoc opt">;</span>
684
685 status <span class="gtkdoc opt">=</span> <span class="function"><a href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-text-to-glyphs">cairo_scaled_font_text_to_glyphs</a></span> <span class="gtkdoc opt">(</span>scaled_font<span class="gtkdoc opt">,</span>
686 x<span class="gtkdoc opt">,</span> y<span class="gtkdoc opt">,</span>
687 utf8<span class="gtkdoc opt">,</span> utf8_len<span class="gtkdoc opt">,</span>
688 <span class="gtkdoc opt">&amp;</span>glyphs<span class="gtkdoc opt">, &amp;</span>num_glyphs<span class="gtkdoc opt">,</span>
689 <span class="gtkdoc opt">&amp;</span>clusters<span class="gtkdoc opt">, &amp;</span>num_clusters<span class="gtkdoc opt">, &amp;</span>cluster_flags<span class="gtkdoc opt">);</span>
690
691 <span class="keyword">if</span> <span class="gtkdoc opt">(</span>status <span class="gtkdoc opt">==</span> CAIRO_STATUS_SUCCESS<span class="gtkdoc opt">) {</span>
692 <span class="function"><a href="cairo-text.html#cairo-show-text-glyphs">cairo_show_text_glyphs</a></span> <span class="gtkdoc opt">(</span>cr<span class="gtkdoc opt">,</span>
693 utf8<span class="gtkdoc opt">,</span> utf8_len<span class="gtkdoc opt">,</span>
694 glyphs<span class="gtkdoc opt">,</span> num_glyphs<span class="gtkdoc opt">,</span>
695 clusters<span class="gtkdoc opt">,</span> num_clusters<span class="gtkdoc opt">,</span> cluster_flags<span class="gtkdoc opt">);</span>
696
697 <span class="keyword">if</span> <span class="gtkdoc opt">(</span>glyphs <span class="gtkdoc opt">!=</span> stack_glyphs<span class="gtkdoc opt">)</span>
698 <span class="function"><a href="cairo-text.html#cairo-glyph-free">cairo_glyph_free</a></span> <span class="gtkdoc opt">(</span>glyphs<span class="gtkdoc opt">);</span>
699 <span class="keyword">if</span> <span class="gtkdoc opt">(</span>clusters <span class="gtkdoc opt">!=</span> stack_clusters<span class="gtkdoc opt">)</span>
700 <span class="function"><a href="cairo-text.html#cairo-text-cluster-free">cairo_text_cluster_free</a></span> <span class="gtkdoc opt">(</span>clusters<span class="gtkdoc opt">);</span>
701 <span class="gtkdoc opt">}</span></pre></td>
702 </tr>
703 </tbody>
704 </table>
705 </div>
706
707 <p>For details of how <em class="parameter"><code>clusters</code></em>
708 , <em class="parameter"><code>num_clusters</code></em>
709 , and <em class="parameter"><code>cluster_flags</code></em>
710 map input
711 UTF-8 text to the output glyphs see <a class="link" href="cairo-text.html#cairo-show-text-glyphs" title="cairo_show_text_glyphs ()"><code class="function">cairo_show_text_glyphs()</code></a>.</p>
712 <p>The output values can be readily passed to <a class="link" href="cairo-text.html#cairo-show-text-glyphs" title="cairo_show_text_glyphs ()"><code class="function">cairo_show_text_glyphs()</code></a>
713 <a class="link" href="cairo-text.html#cairo-show-glyphs" title="cairo_show_glyphs ()"><code class="function">cairo_show_glyphs()</code></a>, or related functions, assuming that the exact
714 same <em class="parameter"><code>scaled_font</code></em>
715 is used for the operation.</p>
716 <div class="refsect3">
717 <a name="cairo-scaled-font-text-to-glyphs.parameters"></a><h4>Parameters</h4>
718 <div class="informaltable"><table class="informaltable" width="100%" border="0">
719 <colgroup>
720 <col width="150px" class="parameters_name">
721 <col class="parameters_description">
722 <col width="200px" class="parameters_annotations">
723 </colgroup>
724 <tbody>
725 <tr>
726 <td class="parameter_name"><p>x</p></td>
727 <td class="parameter_description"><p>X position to place first glyph</p></td>
728 <td class="parameter_annotations"> </td>
729 </tr>
730 <tr>
731 <td class="parameter_name"><p>y</p></td>
732 <td class="parameter_description"><p>Y position to place first glyph</p></td>
733 <td class="parameter_annotations"> </td>
734 </tr>
735 <tr>
736 <td class="parameter_name"><p>scaled_font</p></td>
737 <td class="parameter_description"><p>a <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></td>
738 <td class="parameter_annotations"> </td>
739 </tr>
740 <tr>
741 <td class="parameter_name"><p>utf8</p></td>
742 <td class="parameter_description"><p>a string of text encoded in UTF-8</p></td>
743 <td class="parameter_annotations"> </td>
744 </tr>
745 <tr>
746 <td class="parameter_name"><p>utf8_len</p></td>
747 <td class="parameter_description"><p>length of <em class="parameter"><code>utf8</code></em>
748 in bytes, or -1 if it is NUL-terminated</p></td>
749 <td class="parameter_annotations"> </td>
750 </tr>
751 <tr>
752 <td class="parameter_name"><p>glyphs</p></td>
753 <td class="parameter_description"><p>pointer to array of glyphs to fill</p></td>
754 <td class="parameter_annotations"> </td>
755 </tr>
756 <tr>
757 <td class="parameter_name"><p>num_glyphs</p></td>
758 <td class="parameter_description"><p>pointer to number of glyphs</p></td>
759 <td class="parameter_annotations"> </td>
760 </tr>
761 <tr>
762 <td class="parameter_name"><p>clusters</p></td>
763 <td class="parameter_description"><p>pointer to array of cluster mapping information to fill, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
764 <td class="parameter_annotations"> </td>
765 </tr>
766 <tr>
767 <td class="parameter_name"><p>num_clusters</p></td>
768 <td class="parameter_description"><p>pointer to number of clusters, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
769 <td class="parameter_annotations"> </td>
770 </tr>
771 <tr>
772 <td class="parameter_name"><p>cluster_flags</p></td>
773 <td class="parameter_description"><p>pointer to location to store cluster flags corresponding to the
774 output <em class="parameter"><code>clusters</code></em>
775 , or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></p></td>
776 <td class="parameter_annotations"> </td>
777 </tr>
778 </tbody>
779 </table></div>
780 </div>
781 <div class="refsect3">
782 <a name="cairo-scaled-font-text-to-glyphs.returns"></a><h4>Returns</h4>
783 <p> <a class="link" href="cairo-Error-handling.html#CAIRO-STATUS-SUCCESS:CAPS"><code class="literal">CAIRO_STATUS_SUCCESS</code></a> upon success, or an error status
784 if the input values are wrong or if conversion failed. If the input
785 values are correct but the conversion failed, the error status is also
786 set on <em class="parameter"><code>scaled_font</code></em>
787 .</p>
788 </div>
789 <p class="since">Since: 1.8</p>
790 </div>
791 <hr>
792 <div class="refsect2">
793 <a name="cairo-scaled-font-get-font-face"></a><h3>cairo_scaled_font_get_font_face ()</h3>
794 <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> *
795 cairo_scaled_font_get_font_face (<em class="parameter"><code><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> *scaled_font</code></em>);</pre>
796 <p>Gets the font face that this scaled font uses. This might be the
797 font 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>, but this does not
798 hold true for all possible cases.</p>
799 <div class="refsect3">
800 <a name="cairo-scaled-font-get-font-face.parameters"></a><h4>Parameters</h4>
801 <div class="informaltable"><table class="informaltable" width="100%" border="0">
802 <colgroup>
803 <col width="150px" class="parameters_name">
804 <col class="parameters_description">
805 <col width="200px" class="parameters_annotations">
806 </colgroup>
807 <tbody><tr>
808 <td class="parameter_name"><p>scaled_font</p></td>
809 <td class="parameter_description"><p>a <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></td>
810 <td class="parameter_annotations"> </td>
811 </tr></tbody>
812 </table></div>
813 </div>
814 <div class="refsect3">
815 <a name="cairo-scaled-font-get-font-face.returns"></a><h4>Returns</h4>
816 <p> The <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> with which <em class="parameter"><code>scaled_font</code></em>
817 was
818 created. This object is owned by cairo. To keep a reference to it,
819 you must call <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-reference" title="cairo_scaled_font_reference ()"><code class="function">cairo_scaled_font_reference()</code></a>.</p>
820 </div>
821 <p class="since">Since: 1.2</p>
822 </div>
823 <hr>
824 <div class="refsect2">
825 <a name="cairo-scaled-font-get-font-options"></a><h3>cairo_scaled_font_get_font_options ()</h3>
826 <pre class="programlisting"><span class="returnvalue">void</span>
827 cairo_scaled_font_get_font_options (<em class="parameter"><code><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> *scaled_font</code></em>,
828 <em class="parameter"><code><a class="link" href="cairo-cairo-font-options-t.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a> *options</code></em>);</pre>
829 <p>Stores the font options with which <em class="parameter"><code>scaled_font</code></em>
830 was created into
831 <em class="parameter"><code>options</code></em>
832 .</p>
833 <div class="refsect3">
834 <a name="cairo-scaled-font-get-font-options.parameters"></a><h4>Parameters</h4>
835 <div class="informaltable"><table class="informaltable" width="100%" border="0">
836 <colgroup>
837 <col width="150px" class="parameters_name">
838 <col class="parameters_description">
839 <col width="200px" class="parameters_annotations">
840 </colgroup>
841 <tbody>
842 <tr>
843 <td class="parameter_name"><p>scaled_font</p></td>
844 <td class="parameter_description"><p>a <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></td>
845 <td class="parameter_annotations"> </td>
846 </tr>
847 <tr>
848 <td class="parameter_name"><p>options</p></td>
849 <td class="parameter_description"><p>return value for the font options</p></td>
850 <td class="parameter_annotations"> </td>
851 </tr>
852 </tbody>
853 </table></div>
854 </div>
855 <p class="since">Since: 1.2</p>
856 </div>
857 <hr>
858 <div class="refsect2">
859 <a name="cairo-scaled-font-get-font-matrix"></a><h3>cairo_scaled_font_get_font_matrix ()</h3>
860 <pre class="programlisting"><span class="returnvalue">void</span>
861 cairo_scaled_font_get_font_matrix (<em class="parameter"><code><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> *scaled_font</code></em>,
862 <em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *font_matrix</code></em>);</pre>
863 <p>Stores the font matrix with which <em class="parameter"><code>scaled_font</code></em>
864 was created into
865 <em class="parameter"><code>matrix</code></em>
866 .</p>
867 <div class="refsect3">
868 <a name="cairo-scaled-font-get-font-matrix.parameters"></a><h4>Parameters</h4>
869 <div class="informaltable"><table class="informaltable" width="100%" border="0">
870 <colgroup>
871 <col width="150px" class="parameters_name">
872 <col class="parameters_description">
873 <col width="200px" class="parameters_annotations">
874 </colgroup>
875 <tbody>
876 <tr>
877 <td class="parameter_name"><p>scaled_font</p></td>
878 <td class="parameter_description"><p>a <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></td>
879 <td class="parameter_annotations"> </td>
880 </tr>
881 <tr>
882 <td class="parameter_name"><p>font_matrix</p></td>
883 <td class="parameter_description"><p>return value for the matrix</p></td>
884 <td class="parameter_annotations"> </td>
885 </tr>
886 </tbody>
887 </table></div>
888 </div>
889 <p class="since">Since: 1.2</p>
890 </div>
891 <hr>
892 <div class="refsect2">
893 <a name="cairo-scaled-font-get-ctm"></a><h3>cairo_scaled_font_get_ctm ()</h3>
894 <pre class="programlisting"><span class="returnvalue">void</span>
895 cairo_scaled_font_get_ctm (<em class="parameter"><code><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> *scaled_font</code></em>,
896 <em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *ctm</code></em>);</pre>
897 <p>Stores the CTM with which <em class="parameter"><code>scaled_font</code></em>
898 was created into <em class="parameter"><code>ctm</code></em>
899 .
900 Note that the translation offsets (x0, y0) of the CTM are ignored
901 by <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>. So, the matrix this
902 function returns always has 0,0 as x0,y0.</p>
903 <div class="refsect3">
904 <a name="cairo-scaled-font-get-ctm.parameters"></a><h4>Parameters</h4>
905 <div class="informaltable"><table class="informaltable" width="100%" border="0">
906 <colgroup>
907 <col width="150px" class="parameters_name">
908 <col class="parameters_description">
909 <col width="200px" class="parameters_annotations">
910 </colgroup>
911 <tbody>
912 <tr>
913 <td class="parameter_name"><p>scaled_font</p></td>
914 <td class="parameter_description"><p>a <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></td>
915 <td class="parameter_annotations"> </td>
916 </tr>
917 <tr>
918 <td class="parameter_name"><p>ctm</p></td>
919 <td class="parameter_description"><p>return value for the CTM</p></td>
920 <td class="parameter_annotations"> </td>
921 </tr>
922 </tbody>
923 </table></div>
924 </div>
925 <p class="since">Since: 1.2</p>
926 </div>
927 <hr>
928 <div class="refsect2">
929 <a name="cairo-scaled-font-get-scale-matrix"></a><h3>cairo_scaled_font_get_scale_matrix ()</h3>
930 <pre class="programlisting"><span class="returnvalue">void</span>
931 cairo_scaled_font_get_scale_matrix (<em class="parameter"><code><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> *scaled_font</code></em>,
932 <em class="parameter"><code><a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a> *scale_matrix</code></em>);</pre>
933 <p>Stores the scale matrix of <em class="parameter"><code>scaled_font</code></em>
934 into <em class="parameter"><code>matrix</code></em>
935 .
936 The scale matrix is product of the font matrix and the ctm
937 associated with the scaled font, and hence is the matrix mapping from
938 font space to device space.</p>
939 <div class="refsect3">
940 <a name="cairo-scaled-font-get-scale-matrix.parameters"></a><h4>Parameters</h4>
941 <div class="informaltable"><table class="informaltable" width="100%" border="0">
942 <colgroup>
943 <col width="150px" class="parameters_name">
944 <col class="parameters_description">
945 <col width="200px" class="parameters_annotations">
946 </colgroup>
947 <tbody>
948 <tr>
949 <td class="parameter_name"><p>scaled_font</p></td>
950 <td class="parameter_description"><p>a <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></td>
951 <td class="parameter_annotations"> </td>
952 </tr>
953 <tr>
954 <td class="parameter_name"><p>scale_matrix</p></td>
955 <td class="parameter_description"><p>return value for the matrix</p></td>
956 <td class="parameter_annotations"> </td>
957 </tr>
958 </tbody>
959 </table></div>
960 </div>
961 <p class="since">Since: 1.8</p>
962 </div>
963 <hr>
964 <div class="refsect2">
965 <a name="cairo-scaled-font-get-type"></a><h3>cairo_scaled_font_get_type ()</h3>
966 <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>
967 cairo_scaled_font_get_type (<em class="parameter"><code><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> *scaled_font</code></em>);</pre>
968 <p>This function returns the type of the backend used to create
969 a scaled font. 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.
970 However, this function never returns <a class="link" href="cairo-cairo-font-face-t.html#CAIRO-FONT-TYPE-TOY:CAPS"><code class="literal">CAIRO_FONT_TYPE_TOY</code></a>.</p>
971 <div class="refsect3">
972 <a name="cairo-scaled-font-get-type.parameters"></a><h4>Parameters</h4>
973 <div class="informaltable"><table class="informaltable" width="100%" border="0">
974 <colgroup>
975 <col width="150px" class="parameters_name">
976 <col class="parameters_description">
977 <col width="200px" class="parameters_annotations">
978 </colgroup>
979 <tbody><tr>
980 <td class="parameter_name"><p>scaled_font</p></td>
981 <td class="parameter_description"><p>a <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></td>
982 <td class="parameter_annotations"> </td>
983 </tr></tbody>
984 </table></div>
985 </div>
986 <div class="refsect3">
987 <a name="cairo-scaled-font-get-type.returns"></a><h4>Returns</h4>
988 <p> The type of <em class="parameter"><code>scaled_font</code></em>
989 .</p>
990 </div>
991 <p class="since">Since: 1.2</p>
992 </div>
993 <hr>
994 <div class="refsect2">
995 <a name="cairo-scaled-font-get-reference-count"></a><h3>cairo_scaled_font_get_reference_count ()</h3>
996 <pre class="programlisting">unsigned <span class="returnvalue">int</span>
997 cairo_scaled_font_get_reference_count (<em class="parameter"><code><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> *scaled_font</code></em>);</pre>
998 <p>Returns the current reference count of <em class="parameter"><code>scaled_font</code></em>
999 .</p>
1000 <div class="refsect3">
1001 <a name="cairo-scaled-font-get-reference-count.parameters"></a><h4>Parameters</h4>
1002 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1003 <colgroup>
1004 <col width="150px" class="parameters_name">
1005 <col class="parameters_description">
1006 <col width="200px" class="parameters_annotations">
1007 </colgroup>
1008 <tbody><tr>
1009 <td class="parameter_name"><p>scaled_font</p></td>
1010 <td class="parameter_description"><p>a <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></td>
1011 <td class="parameter_annotations"> </td>
1012 </tr></tbody>
1013 </table></div>
1014 </div>
1015 <div class="refsect3">
1016 <a name="cairo-scaled-font-get-reference-count.returns"></a><h4>Returns</h4>
1017 <p> the current reference count of <em class="parameter"><code>scaled_font</code></em>
1018 . If the
1019 object is a nil object, 0 will be returned.</p>
1020 </div>
1021 <p class="since">Since: 1.4</p>
1022 </div>
1023 <hr>
1024 <div class="refsect2">
1025 <a name="cairo-scaled-font-set-user-data"></a><h3>cairo_scaled_font_set_user_data ()</h3>
1026 <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>
1027 cairo_scaled_font_set_user_data (<em class="parameter"><code><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> *scaled_font</code></em>,
1028 <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>,
1029 <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
1030 <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>
1031 <p>Attach user data to <em class="parameter"><code>scaled_font</code></em>
1032 . To remove user data from a surface,
1033 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>
1034 for <em class="parameter"><code>data</code></em>
1035 .</p>
1036 <div class="refsect3">
1037 <a name="cairo-scaled-font-set-user-data.parameters"></a><h4>Parameters</h4>
1038 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1039 <colgroup>
1040 <col width="150px" class="parameters_name">
1041 <col class="parameters_description">
1042 <col width="200px" class="parameters_annotations">
1043 </colgroup>
1044 <tbody>
1045 <tr>
1046 <td class="parameter_name"><p>scaled_font</p></td>
1047 <td class="parameter_description"><p>a <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></td>
1048 <td class="parameter_annotations"> </td>
1049 </tr>
1050 <tr>
1051 <td class="parameter_name"><p>key</p></td>
1052 <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>
1053 <td class="parameter_annotations"> </td>
1054 </tr>
1055 <tr>
1056 <td class="parameter_name"><p>user_data</p></td>
1057 <td class="parameter_description"><p>the user data to attach to the <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></td>
1058 <td class="parameter_annotations"> </td>
1059 </tr>
1060 <tr>
1061 <td class="parameter_name"><p>destroy</p></td>
1062 <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
1063 <a class="link" href="cairo-cairo-t.html#cairo-t" title="cairo_t"><span class="type">cairo_t</span></a> is destroyed or when new user data is attached using the
1064 same key.</p></td>
1065 <td class="parameter_annotations"> </td>
1066 </tr>
1067 </tbody>
1068 </table></div>
1069 </div>
1070 <div class="refsect3">
1071 <a name="cairo-scaled-font-set-user-data.returns"></a><h4>Returns</h4>
1072 <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
1073 slot could not be allocated for the user data.</p>
1074 </div>
1075 <p class="since">Since: 1.4</p>
1076 </div>
1077 <hr>
1078 <div class="refsect2">
1079 <a name="cairo-scaled-font-get-user-data"></a><h3>cairo_scaled_font_get_user_data ()</h3>
1080 <pre class="programlisting"><span class="returnvalue">void</span> *
1081 cairo_scaled_font_get_user_data (<em class="parameter"><code><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> *scaled_font</code></em>,
1082 <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>
1083 <p>Return user data previously attached to <em class="parameter"><code>scaled_font</code></em>
1084 using the
1085 specified key. If no user data has been attached with the given
1086 key this function returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1087 <div class="refsect3">
1088 <a name="cairo-scaled-font-get-user-data.parameters"></a><h4>Parameters</h4>
1089 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1090 <colgroup>
1091 <col width="150px" class="parameters_name">
1092 <col class="parameters_description">
1093 <col width="200px" class="parameters_annotations">
1094 </colgroup>
1095 <tbody>
1096 <tr>
1097 <td class="parameter_name"><p>scaled_font</p></td>
1098 <td class="parameter_description"><p>a <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></td>
1099 <td class="parameter_annotations"> </td>
1100 </tr>
1101 <tr>
1102 <td class="parameter_name"><p>key</p></td>
1103 <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
1104 attached to</p></td>
1105 <td class="parameter_annotations"> </td>
1106 </tr>
1107 </tbody>
1108 </table></div>
1109 </div>
1110 <div class="refsect3">
1111 <a name="cairo-scaled-font-get-user-data.returns"></a><h4>Returns</h4>
1112 <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>
1113 </div>
1114 <p class="since">Since: 1.4</p>
1115 </div>
1116 </div>
1117 <div class="refsect1">
1118 <a name="cairo-cairo-scaled-font-t.other_details"></a><h2>Types and Values</h2>
1119 <div class="refsect2">
1120 <a name="cairo-scaled-font-t"></a><h3>cairo_scaled_font_t</h3>
1121 <pre class="programlisting">typedef struct _cairo_scaled_font cairo_scaled_font_t;
1122 </pre>
1123 <p>A <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> is a font scaled to a particular size and device
1124 resolution. A <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> is most useful for low-level font
1125 usage where a library or application wants to cache a reference
1126 to a scaled font to speed up the computation of metrics.</p>
1127 <p>There are various types of scaled fonts, depending on the
1128 <em class="firstterm">font backend</em> they use. The type of a
1129 scaled font can be queried using <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>
1130 <p>Memory management of <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> is done with
1131 <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-reference" title="cairo_scaled_font_reference ()"><code class="function">cairo_scaled_font_reference()</code></a> and <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-scaled-font-destroy" title="cairo_scaled_font_destroy ()"><code class="function">cairo_scaled_font_destroy()</code></a>.</p>
1132 <p class="since">Since: 1.0</p>
1133 </div>
1134 <hr>
1135 <div class="refsect2">
1136 <a name="cairo-font-extents-t"></a><h3>cairo_font_extents_t</h3>
1137 <pre class="programlisting">typedef struct {
1138 double ascent;
1139 double descent;
1140 double height;
1141 double max_x_advance;
1142 double max_y_advance;
1143 } cairo_font_extents_t;
1144 </pre>
1145 <p>The <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-font-extents-t" title="cairo_font_extents_t"><span class="type">cairo_font_extents_t</span></a> structure stores metric information for
1146 a font. Values are given in the current user-space coordinate
1147 system.</p>
1148 <p>Because font metrics are in user-space coordinates, they are
1149 mostly, but not entirely, independent of the current transformation
1150 matrix. If you call <code class="literal">cairo_scale(cr, 2.0, 2.0)</code>,
1151 text will be drawn twice as big, but the reported text extents will
1152 not be doubled. They will change slightly due to hinting (so you
1153 can't assume that metrics are independent of the transformation
1154 matrix), but otherwise will remain unchanged.</p>
1155 <div class="refsect3">
1156 <a name="cairo-font-extents-t.members"></a><h4>Members</h4>
1157 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1158 <colgroup>
1159 <col width="300px" class="struct_members_name">
1160 <col class="struct_members_description">
1161 <col width="200px" class="struct_members_annotations">
1162 </colgroup>
1163 <tbody>
1164 <tr>
1165 <td class="struct_member_name"><p><span class="type">double</span> <em class="structfield"><code><a name="cairo-font-extents-t.ascent"></a>ascent</code></em>;</p></td>
1166 <td class="struct_member_description"><p>the distance that the font extends above the baseline.
1167 Note that this is not always exactly equal to the maximum
1168 of the extents of all the glyphs in the font, but rather
1169 is picked to express the font designer's intent as to
1170 how the font should align with elements above it.</p></td>
1171 <td class="struct_member_annotations"> </td>
1172 </tr>
1173 <tr>
1174 <td class="struct_member_name"><p><span class="type">double</span> <em class="structfield"><code><a name="cairo-font-extents-t.descent"></a>descent</code></em>;</p></td>
1175 <td class="struct_member_description"><p>the distance that the font extends below the baseline.
1176 This value is positive for typical fonts that include
1177 portions below the baseline. Note that this is not always
1178 exactly equal to the maximum of the extents of all the
1179 glyphs in the font, but rather is picked to express the
1180 font designer's intent as to how the font should
1181 align with elements below it.</p></td>
1182 <td class="struct_member_annotations"> </td>
1183 </tr>
1184 <tr>
1185 <td class="struct_member_name"><p><span class="type">double</span> <em class="structfield"><code><a name="cairo-font-extents-t.height"></a>height</code></em>;</p></td>
1186 <td class="struct_member_description"><p>the recommended vertical distance between baselines when
1187 setting consecutive lines of text with the font. This
1188 is greater than <em class="parameter"><code>ascent</code></em>
1189 +<em class="parameter"><code>descent</code></em>
1190 by a
1191 quantity known as the <em class="firstterm">line spacing</em>
1192 or <em class="firstterm">external leading</em>. When space
1193 is at a premium, most fonts can be set with only
1194 a distance of <em class="parameter"><code>ascent</code></em>
1195 +<em class="parameter"><code>descent</code></em>
1196 between lines.</p></td>
1197 <td class="struct_member_annotations"> </td>
1198 </tr>
1199 <tr>
1200 <td class="struct_member_name"><p><span class="type">double</span> <em class="structfield"><code><a name="cairo-font-extents-t.max-x-advance"></a>max_x_advance</code></em>;</p></td>
1201 <td class="struct_member_description"><p>the maximum distance in the X direction that
1202 the origin is advanced for any glyph in the font.</p></td>
1203 <td class="struct_member_annotations"> </td>
1204 </tr>
1205 <tr>
1206 <td class="struct_member_name"><p><span class="type">double</span> <em class="structfield"><code><a name="cairo-font-extents-t.max-y-advance"></a>max_y_advance</code></em>;</p></td>
1207 <td class="struct_member_description"><p>the maximum distance in the Y direction that
1208 the origin is advanced for any glyph in the font.
1209 This will be zero for normal fonts used for horizontal
1210 writing. (The scripts of East Asia are sometimes written
1211 vertically.)</p></td>
1212 <td class="struct_member_annotations"> </td>
1213 </tr>
1214 </tbody>
1215 </table></div>
1216 </div>
1217 <p class="since">Since: 1.0</p>
1218 </div>
1219 <hr>
1220 <div class="refsect2">
1221 <a name="cairo-text-extents-t"></a><h3>cairo_text_extents_t</h3>
1222 <pre class="programlisting">typedef struct {
1223 double x_bearing;
1224 double y_bearing;
1225 double width;
1226 double height;
1227 double x_advance;
1228 double y_advance;
1229 } cairo_text_extents_t;
1230 </pre>
1231 <p>The <a class="link" href="cairo-cairo-scaled-font-t.html#cairo-text-extents-t" title="cairo_text_extents_t"><span class="type">cairo_text_extents_t</span></a> structure stores the extents of a single
1232 glyph or a string of glyphs in user-space coordinates. Because text
1233 extents are in user-space coordinates, they are mostly, but not
1234 entirely, independent of the current transformation matrix. If you call
1235 <code class="literal">cairo_scale(cr, 2.0, 2.0)</code>, text will
1236 be drawn twice as big, but the reported text extents will not be
1237 doubled. They will change slightly due to hinting (so you can't
1238 assume that metrics are independent of the transformation matrix),
1239 but otherwise will remain unchanged.</p>
1240 <div class="refsect3">
1241 <a name="cairo-text-extents-t.members"></a><h4>Members</h4>
1242 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1243 <colgroup>
1244 <col width="300px" class="struct_members_name">
1245 <col class="struct_members_description">
1246 <col width="200px" class="struct_members_annotations">
1247 </colgroup>
1248 <tbody>
1249 <tr>
1250 <td class="struct_member_name"><p><span class="type">double</span> <em class="structfield"><code><a name="cairo-text-extents-t.x-bearing"></a>x_bearing</code></em>;</p></td>
1251 <td class="struct_member_description"><p>the horizontal distance from the origin to the
1252 leftmost part of the glyphs as drawn. Positive if the
1253 glyphs lie entirely to the right of the origin.</p></td>
1254 <td class="struct_member_annotations"> </td>
1255 </tr>
1256 <tr>
1257 <td class="struct_member_name"><p><span class="type">double</span> <em class="structfield"><code><a name="cairo-text-extents-t.y-bearing"></a>y_bearing</code></em>;</p></td>
1258 <td class="struct_member_description"><p>the vertical distance from the origin to the
1259 topmost part of the glyphs as drawn. Positive only if the
1260 glyphs lie completely below the origin; will usually be
1261 negative.</p></td>
1262 <td class="struct_member_annotations"> </td>
1263 </tr>
1264 <tr>
1265 <td class="struct_member_name"><p><span class="type">double</span> <em class="structfield"><code><a name="cairo-text-extents-t.width"></a>width</code></em>;</p></td>
1266 <td class="struct_member_description"><p>width of the glyphs as drawn</p></td>
1267 <td class="struct_member_annotations"> </td>
1268 </tr>
1269 <tr>
1270 <td class="struct_member_name"><p><span class="type">double</span> <em class="structfield"><code><a name="cairo-text-extents-t.height"></a>height</code></em>;</p></td>
1271 <td class="struct_member_description"><p>height of the glyphs as drawn</p></td>
1272 <td class="struct_member_annotations"> </td>
1273 </tr>
1274 <tr>
1275 <td class="struct_member_name"><p><span class="type">double</span> <em class="structfield"><code><a name="cairo-text-extents-t.x-advance"></a>x_advance</code></em>;</p></td>
1276 <td class="struct_member_description"><p>distance to advance in the X direction
1277 after drawing these glyphs</p></td>
1278 <td class="struct_member_annotations"> </td>
1279 </tr>
1280 <tr>
1281 <td class="struct_member_name"><p><span class="type">double</span> <em class="structfield"><code><a name="cairo-text-extents-t.y-advance"></a>y_advance</code></em>;</p></td>
1282 <td class="struct_member_description"><p>distance to advance in the Y direction
1283 after drawing these glyphs. Will typically be zero except
1284 for vertical text layout as found in East-Asian languages.</p></td>
1285 <td class="struct_member_annotations"> </td>
1286 </tr>
1287 </tbody>
1288 </table></div>
1289 </div>
1290 <p class="since">Since: 1.0</p>
1291 </div>
1292 </div>
1293 <div class="refsect1">
1294 <a name="cairo-cairo-scaled-font-t.see-also"></a><h2>See Also</h2>
1295 <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>, <a class="link" href="cairo-cairo-matrix-t.html#cairo-matrix-t" title="cairo_matrix_t"><span class="type">cairo_matrix_t</span></a>, <a class="link" href="cairo-cairo-font-options-t.html#cairo-font-options-t" title="cairo_font_options_t"><span class="type">cairo_font_options_t</span></a></p>
1296 </div>
1297 </div>
1298 <div class="footer">
1299 <hr>Generated by GTK-Doc V1.27</div>
1300 </body>
1301 </html>