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