added docs for glyphs
[sdlgit/SDL-Site.git] / pages / SDL-TTF.html-inc
1 <div class="pod">
2 <!-- INDEX START -->
3 <h3 id="TOP">Index</h3>
4
5 <ul><li><a href="#NAME">NAME</a></li>
6 <li><a href="#CATEGORY">CATEGORY</a></li>
7 <li><a href="#METHODS">METHODS</a>
8 <ul><li><a href="#General_methods">General methods</a>
9 <ul><li><a href="#linked_version">linked_version</a></li>
10 <li><a href="#compile_time_version">compile_time_version</a></li>
11 <li><a href="#init">init</a></li>
12 <li><a href="#was_init">was_init</a></li>
13 <li><a href="#quit">quit</a></li>
14 </ul>
15 </li>
16 <li><a href="#Management_functions">Management functions</a>
17 <ul><li><a href="#open_font">open_font</a></li>
18 <li><a href="#open_font_index">open_font_index</a></li>
19 <li><a href="#open_font_RW">open_font_RW</a></li>
20 <li><a href="#open_font_index_RW">open_font_index_RW</a></li>
21 </ul>
22 </li>
23 <li><a href="#Attributes">Attributes</a>
24 <ul><li><a href="#Global_attributes">Global attributes</a>
25 <ul><li><a href="#byte_swapped_unicode">byte_swapped_unicode</a></li>
26 </ul>
27 </li>
28 <li><a href="#Font_style">Font style</a>
29 <ul><li><a href="#get_font_style">get_font_style</a></li>
30 <li><a href="#set_font_style">set_font_style</a></li>
31 <li><a href="#get_font_outline">get_font_outline</a></li>
32 <li><a href="#set_font_outline">set_font_outline</a></li>
33 </ul>
34 </li>
35 <li><a href="#Font_settings">Font settings</a>
36 <ul><li><a href="#get_font_hinting">get_font_hinting</a></li>
37 <li><a href="#set_font_hinting">set_font_hinting</a></li>
38 <li><a href="#get_font_kerning">get_font_kerning</a></li>
39 <li><a href="#set_font_kerning">set_font_kerning</a></li>
40 </ul>
41 </li>
42 <li><a href="#Font_metrics">Font metrics</a>
43 <ul><li><a href="#font_height">font_height</a></li>
44 <li><a href="#font_ascent">font_ascent</a></li>
45 <li><a href="#font_descent">font_descent</a></li>
46 <li><a href="#font_line_skip">font_line_skip</a></li>
47 </ul>
48 </li>
49 <li><a href="#Face_attributes">Face attributes</a>
50 <ul><li><a href="#font_faces">font_faces</a></li>
51 <li><a href="#font_face_is_fixed_width">font_face_is_fixed_width</a></li>
52 <li><a href="#font_face_family_name">font_face_family_name</a></li>
53 <li><a href="#font_face_style_name">font_face_style_name</a></li>
54 </ul>
55 </li>
56 <li><a href="#Glyphs">Glyphs</a>
57 <ul><li><a href="#glyph_is_provided">glyph_is_provided</a></li>
58 <li><a href="#glyph_metrics">glyph_metrics</a></li>
59 </ul>
60 </li>
61 <li><a href="#Text_metrics">Text metrics</a>
62 <ul><li><a href="#size_text">size_text</a></li>
63 <li><a href="#size_utf8">size_utf8</a></li>
64 <li><a href="#size_unicode">size_unicode</a></li>
65 </ul>
66 </li>
67 </ul>
68 </li>
69 <li><a href="#Font_Rendering">Font Rendering</a>
70 <ul><li><a href="#render_glyph_solid">render_glyph_solid</a></li>
71 <li><a href="#render_glyph_shaded">render_glyph_shaded</a></li>
72 <li><a href="#render_glyph_blended">render_glyph_blended</a></li>
73 <li><a href="#render_text_solid">render_text_solid</a></li>
74 <li><a href="#render_text_shaded">render_text_shaded</a></li>
75 <li><a href="#render_text_blended">render_text_blended</a></li>
76 <li><a href="#render_utf8_solid">render_utf8_solid</a></li>
77 <li><a href="#render_utf8_shaded">render_utf8_shaded</a></li>
78 <li><a href="#render_utf8_blended">render_utf8_blended</a></li>
79 <li><a href="#render_unicode_solid">render_unicode_solid</a></li>
80 <li><a href="#render_unicode_shaded">render_unicode_shaded</a></li>
81 <li><a href="#render_unicode_blended">render_unicode_blended</a></li>
82 </ul>
83 </li>
84 </ul>
85 </li>
86 <li><a href="#AUTHOR">AUTHOR</a></li>
87 <li><a href="#SEE_ALSO">SEE ALSO</a>
88 </li>
89 </ul><hr />
90 <!-- INDEX END -->
91
92 <h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
93 <div id="NAME_CONTENT">
94 <p>SDL::TTF - True Type Font functions (libfreetype)</p>
95
96 </div>
97 <h1 id="CATEGORY">CATEGORY</h1><p><a href="#TOP" class="toplink">Top</a></p>
98 <div id="CATEGORY_CONTENT">
99 <p>TODO, TTF</p>
100
101 </div>
102 <h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
103 <div id="METHODS_CONTENT">
104
105 </div>
106 <h2 id="General_methods">General methods</h2>
107 <div id="General_methods_CONTENT">
108
109 </div>
110 <h3 id="linked_version">linked_version</h3>
111 <div id="linked_version_CONTENT">
112 <pre> my $version = SDL::TTF::linked_version();
113
114 </pre>
115 <p>This gives you the SDL::Version object which SDL_ttf lib is used on the system.
116 No prior initialization needs to be done before these function is called. </p>
117 <p>Example:</p>
118 <pre> use SDL::TTF;
119  use SDL::Version;
120
121  my $version = SDL::TTF::linked_version();
122
123  printf(&quot;got version: %d.%d.%d\n&quot;, $version-&gt;major, $version-&gt;minor, $version-&gt;patch);
124
125 </pre>
126
127 </div>
128 <h3 id="compile_time_version">compile_time_version</h3>
129 <div id="compile_time_version_CONTENT">
130 <pre> my $version = SDL::TTF::compile_time_version();
131
132 </pre>
133 <p>This gives you the SDL::Version object which SDL_ttf was present at compile time.</p>
134
135 </div>
136 <h3 id="init">init</h3>
137 <div id="init_CONTENT">
138 <pre> my $success = SDL::TTF::init();
139
140 </pre>
141 <p>Initialize the truetype font API.
142 This must be called before using other functions in this library, except <a href="/SDL-TTF.html#was_init">SDL::TTF::was_init</a> and <a href="/SDL-TTF.html#linked_version">SDL::TTF::linked_version</a>.
143 SDL does not have to be initialized before this call.</p>
144 <p>Returns: <code>0</code> on success, <code>-1</code> on any error.</p>
145
146 </div>
147 <h3 id="was_init">was_init</h3>
148 <div id="was_init_CONTENT">
149 <pre> my $was_init = SDL::TTF::was_init();
150
151 </pre>
152 <p>Query the initilization status of the truetype font API.
153 You may, of course, use this before <a href="/SDL-TTF.html#init">SDL::TTF::init</a> to avoid initializing twice in a row. Or use this to determine if you need to call 
154 <a href="/SDL-TTF.html#quit">SDL::TTF::quit</a>.</p>
155
156 </div>
157 <h3 id="quit">quit</h3>
158 <div id="quit_CONTENT">
159 <pre> SDL::TTF::quit();
160
161 </pre>
162 <p>Shutdown and cleanup the truetype font API.
163 After calling this the SDL::TTF functions should not be used, excepting <a href="/SDL-TTF.html#was_init">SDL::TTF::was_init</a>. You may, of course, use <a href="/SDL-TTF.html#init">SDL::TTF::init</a> to 
164 use the functionality again</p>
165
166 </div>
167 <h2 id="Management_functions">Management functions</h2>
168 <div id="Management_functions_CONTENT">
169
170 </div>
171 <h3 id="open_font">open_font</h3>
172 <div id="open_font_CONTENT">
173 <pre> my $font = SDL::TTF::open_font($font_file, $point_size);
174
175 </pre>
176 <p>Load file for use as a font, at the given size. This is actually <code>SDL::TTF::open_font_index(..., ..., $index = 0)</code>. This can load TTF and FON files.</p>
177 <p>Returns: a <a href="SDL-TTF-Font.html">SDL::TTF::Font</a> object. <code>undef</code> is returned on errors.</p>
178 <p>Example:</p>
179 <pre> use SDL::TTF;
180  use SDL::TTF::Font;
181
182  my $font = SDL::TTF::open_font('arial.ttf', '24);
183
184 </pre>
185
186 </div>
187 <h3 id="open_font_index">open_font_index</h3>
188 <div id="open_font_index_CONTENT">
189 <pre> my $font = SDL::TTF::open_font($font_file, $point_size, $face_index);
190
191 </pre>
192 <p>This is the same as <a href="/SDL-TTF.html#open_font">SDL::TTF::open_font</a>, except you can specify the face index of a font file containing multiple faces. 
193 This can load TTF and FON files. </p>
194
195 </div>
196 <h3 id="open_font_RW">open_font_RW</h3>
197 <div id="open_font_RW_CONTENT">
198 <pre> my $font = SDL::TTF::open_font_RW($rwops_object, $free, $point_size);
199
200 </pre>
201 <p>This is the same as <a href="/SDL-TTF.html#open_font">SDL::TTF::open_font</a>, except you can pass an <a href="SDL-RWOps.html">SDL::RWOps</a>-object. If you pass true as <code>$free</code>, the <a href="SDL-RWOps.html">SDL::RWOps</a>-object
202 will be freed by SDL_ttf library. Don't do this, perl will free this object for you.</p>
203 <p>Example:</p>
204 <pre> my $font = SDL::TTF::open_font_RW(SDL::RWOps-&gt;new_file($font_file, 'r'), 0, 24);
205
206 </pre>
207
208 </div>
209 <h3 id="open_font_index_RW">open_font_index_RW</h3>
210 <div id="open_font_index_RW_CONTENT">
211 <pre> my $font = SDL::TTF::open_font_index_RW($rwops_object, $free, $point_size, $face_index);
212
213 </pre>
214 <p>This is the same as <a href="/SDL-TTF.html#open_font_index">SDL::TTF::open_font_index</a>, except you can pass an <a href="SDL-RWOps.html">SDL::RWOps</a>-object. If you pass true as <code>$free</code>, the 
215 <a href="SDL-RWOps.html">SDL::RWOps</a>-object will be freed by SDL_ttf library. Don't do this, perl will free this object for you.</p>
216
217 </div>
218 <h2 id="Attributes">Attributes</h2>
219 <div id="Attributes_CONTENT">
220
221 </div>
222 <h3 id="Global_attributes">Global attributes</h3>
223 <div id="Global_attributes_CONTENT">
224
225 </div>
226 <h4 id="byte_swapped_unicode">byte_swapped_unicode</h4>
227 <div id="byte_swapped_unicode_CONTENT">
228 <pre> SDL::TTF::byte_swapped_unicode( $bool );
229
230 </pre>
231 <p>This function tells SDL_ttf whether UNICODE (2 bytes per character) text is generally byteswapped. A <code>UNICODE_BOM_NATIVE</code> or 
232 <code>UNICODE_BOM_SWAPPED</code> character in a string will temporarily override this setting for the remainder of that string, however this setting 
233 will be restored for the next one. The default mode is non-swapped, native endianness of the CPU.</p>
234
235 </div>
236 <h3 id="Font_style">Font style</h3>
237 <div id="Font_style_CONTENT">
238
239 </div>
240 <h4 id="get_font_style">get_font_style</h4>
241 <div id="get_font_style_CONTENT">
242 <pre> SDL::TTF::get_font_style($font);
243
244 </pre>
245 <p>Returns: The style as a bitmask composed of the following masks:</p>
246 <ul>
247                 <li>TTF_STYLE_NORMAL    </li>
248                 <li>TTF_STYLE_BOLD      </li>
249                 <li>TTF_STYLE_ITALIC    </li>
250                 <li>TTF_STYLE_UNDERLINE </li>
251                 <li>TTF_STYLE_STRIKETHROUGH (since SDL_ttf 2.0.10)</li>
252 </ul>
253
254 <p>Example:</p>
255 <pre> my $style = SDL::TTF::get_font_style($font);
256
257  print(&quot;normal\n&quot;)        if $style == TTF_STYLE_NORMAL;
258  print(&quot;bold\n&quot;)          if $style  &amp; TTF_STYLE_BOLD;
259  print(&quot;italic\n&quot;)        if $style  &amp; TTF_STYLE_ITALIC;
260  print(&quot;underline\n&quot;)     if $style  &amp; TTF_STYLE_UNDERLINE;
261  print(&quot;strikethrough\n&quot;) if $style  &amp; TTF_STYLE_STRIKETHROUGH;
262
263 </pre>
264
265 </div>
266 <h4 id="set_font_style">set_font_style</h4>
267 <div id="set_font_style_CONTENT">
268 <pre> SDL::TTF::set_font_style($font, $style);
269
270 </pre>
271 <p>Set the rendering style of the loaded font.</p>
272 <p><strong>Note</strong>: <code>TTF_STYLE_UNDERLINE</code> may cause surfaces created by <code>SDL::TTF::render_glyph_*</code> functions to be extended vertically, downward only, 
273 to encompass the underline if the original glyph metrics didn't allow for the underline to be drawn below. This does not change the math used 
274 to place a glyph using glyph metrics.
275 On the other hand <code>TTF_STYLE_STRIKETHROUGH</code> doesn't extend the glyph, since this would invalidate the metrics used to position the glyph when 
276 blitting, because they would likely be extended vertically upward. There is perhaps a workaround, but it would require programs to be smarter 
277 about glyph blitting math than they are currently designed for.
278 Still, sometimes the underline or strikethrough may be outside of the generated surface, and thus not visible when blitted to the screen. In 
279 this case, you should probably turn off these styles and draw your own strikethroughs and underlines. </p>
280
281 </div>
282 <h4 id="get_font_outline">get_font_outline</h4>
283 <div id="get_font_outline_CONTENT">
284 <pre> my $outline = SDL::TTF::get_font_outline($font);
285
286 </pre>
287 <p>Get the current outline width of the font, in pixels.</p>
288 <p><strong>Note</strong>: at least SDL_ttf 2.0.10 needed</p>
289
290 </div>
291 <h4 id="set_font_outline">set_font_outline</h4>
292 <div id="set_font_outline_CONTENT">
293 <pre> SDL::TTF::get_font_outline($font, $outline);
294
295 </pre>
296 <p>Set the outline pixel width of the loaded font. Use <code>0</code>(zero) to turn off outlining.</p>
297 <p><strong>Note</strong>: at least SDL_ttf 2.0.10 needed</p>
298
299 </div>
300 <h3 id="Font_settings">Font settings</h3>
301 <div id="Font_settings_CONTENT">
302
303 </div>
304 <h4 id="get_font_hinting">get_font_hinting</h4>
305 <div id="get_font_hinting_CONTENT">
306 <pre> my $hinting = SDL::TTF::get_font_hinting($font);
307
308 </pre>
309 <p>Get the current hinting setting of the loaded font.</p>
310 <p><strong>Note</strong>: at least SDL_ttf 2.0.10 needed</p>
311 <p>Returns the hinting type matching one of the following defined values:</p>
312 <ul>
313                 <li>TTF_HINTING_NORMAL  </li>
314                 <li>TTF_HINTING_LIGHT   </li>
315                 <li>TTF_HINTING_MONO    </li>
316                 <li>TTF_HINTING_NONE</li>
317 </ul>
318
319
320 </div>
321 <h4 id="set_font_hinting">set_font_hinting</h4>
322 <div id="set_font_hinting_CONTENT">
323 <pre> SDL::TTF::set_font_hinting($font, $hinting);
324
325 </pre>
326 <p>Set the hinting of the loaded font. You should experiment with this setting if you know which font you are using beforehand, especially when 
327 using smaller sized fonts. If the user is selecting a font, you may wish to let them select the hinting mode for that font as well.</p>
328 <p><strong>Note</strong>: at least SDL_ttf 2.0.10 needed</p>
329 <p>Example:</p>
330 <pre> SDL::TTF::set_font_hinting($font, TTF_HINTING_LIGHT);
331
332 </pre>
333
334 </div>
335 <h4 id="get_font_kerning">get_font_kerning</h4>
336 <div id="get_font_kerning_CONTENT">
337 <pre> my $kerning_enabled = SDL::TTF::get_font_kerning($font);
338
339 </pre>
340 <p>Get the current kerning setting of the loaded font.</p>
341 <p>Returns: <code>0</code>(zero) if kerning is disabled. A non-zero value is returned when enabled. The default for a newly loaded font is enabled(<code>1</code>). </p>
342 <p><strong>Note</strong>: at least SDL_ttf 2.0.10 needed</p>
343
344 </div>
345 <h4 id="set_font_kerning">set_font_kerning</h4>
346 <div id="set_font_kerning_CONTENT">
347 <pre> SDL::TTF::set_font_kerning($font, $kerning_enabled);
348
349 </pre>
350 <p>Set whether to use kerning when rendering the loaded font. This has no effect on individual glyphs, but rather when rendering whole strings of 
351 characters, at least a word at a time. Perhaps the only time to disable this is when kerning is not working for a specific font, resulting in 
352 overlapping glyphs or abnormal spacing within words.</p>
353 <p>Pass <code>0</code> to disable kerning, 1 to enable.</p>
354 <p><strong>Note</strong>: at least SDL_ttf 2.0.10 needed</p>
355
356 </div>
357 <h3 id="Font_metrics">Font metrics</h3>
358 <div id="Font_metrics_CONTENT">
359
360 </div>
361 <h4 id="font_height">font_height</h4>
362 <div id="font_height_CONTENT">
363 <pre> my $font_height = SDL::TTF::font_height($font);
364
365 </pre>
366 <p>Get the maximum pixel height of all glyphs of the loaded font. You may use this height for rendering text as close together vertically as 
367 possible, though adding at least one pixel height to it will space it so they can't touch. Remember that SDL_ttf doesn't handle multiline 
368 printing, so you are responsible for line spacing, see the <a href="/SDL-TTF.html#font_line_skip">SDL::TTF::font_line_skip</a> as well.</p>
369
370 </div>
371 <h4 id="font_ascent">font_ascent</h4>
372 <div id="font_ascent_CONTENT">
373 <pre> my $font_ascent = SDL::TTF::font_ascent($font);
374
375 </pre>
376 <p>Get the maximum pixel ascent of all glyphs of the loaded font. This can also be interpreted as the distance from the top of the font to the 
377 baseline.
378 It could be used when drawing an individual glyph relative to a top point, by combining it with the glyph's <code>maxy</code> metric to resolve the top 
379 of the rectangle used when blitting the glyph on the screen.</p>
380 <p>Example:</p>
381 <pre> my ($minx, $maxx, $miny, $maxy, $advance) = @{ SDL::TTF::glyph_metrics($font, &quot;\0M&quot;) };
382
383  $rect-&gt;y( $top + SDL::TTF::font_ascent($font) - $maxy );
384
385 </pre>
386
387 </div>
388 <h4 id="font_descent">font_descent</h4>
389 <div id="font_descent_CONTENT">
390 <pre> my $font_descent = SDL::TTF::font_descent($font);
391
392 </pre>
393 <p>Get the maximum pixel descent of all glyphs of the loaded font. This can also be interpreted as the distance from the baseline to the bottom of 
394 the font.
395 It could be used when drawing an individual glyph relative to a bottom point, by combining it with the glyph's <code>maxy</code> metric to resolve the top 
396 of the rectangle used when blitting the glyph on the screen.</p>
397 <p>Example:</p>
398 <pre> my ($minx, $maxx, $miny, $maxy, $advance) = @{ SDL::TTF::glyph_metrics($font, &quot;\0M&quot;) };
399
400  $rect-&gt;y( $bottom - SDL::TTF::font_descent($font) - $maxy );
401
402 </pre>
403
404 </div>
405 <h4 id="font_line_skip">font_line_skip</h4>
406 <div id="font_line_skip_CONTENT">
407 <pre> my $font_line_skip = SDL::TTF::font_line_skip($font);
408
409 </pre>
410 <p>Get the recommended pixel height of a rendered line of text of the loaded font. This is usually larger than the <a href="/SDL-TTF.html#font_height">SDL::TTF::font_height</a> of the 
411 font.</p>
412
413 </div>
414 <h3 id="Face_attributes">Face attributes</h3>
415 <div id="Face_attributes_CONTENT">
416
417 </div>
418 <h4 id="font_faces">font_faces</h4>
419 <div id="font_faces_CONTENT">
420 <pre> my $font_faces = SDL::TTF::font_faces($font);
421
422 </pre>
423 <p>Get the number of faces (&quot;sub-fonts&quot;) available in the loaded font. This is a count of the number of specific fonts (based on size and style 
424 and other typographical features perhaps) contained in the font itself.</p>
425
426 </div>
427 <h4 id="font_face_is_fixed_width">font_face_is_fixed_width</h4>
428 <div id="font_face_is_fixed_width_CONTENT">
429 <pre> my $font_face_is_fixed_width = SDL::TTF::font_face_is_fixed_width($font);
430
431 </pre>
432 <p>Test if the current font face of the loaded font is a fixed width font. Fixed width fonts are monospace, meaning every character that exists 
433 in the font is the same width, thus you can assume that a rendered string's width is going to be the result of <code>glyph_width * string_length</code>.</p>
434 <p>Returns: <code>&gt;0</code> if font is a fixed width font. <code>0</code> if not a fixed width font. </p>
435
436 </div>
437 <h4 id="font_face_family_name">font_face_family_name</h4>
438 <div id="font_face_family_name_CONTENT">
439 <pre> my $font_face_family_name = SDL::TTF::font_face_family_name($font);
440
441 </pre>
442 <p>Get the current font face family name from the loaded font. This information is not for every font available.</p>
443 <p>Example:</p>
444 <pre> my $font = SDL::TTF::open_font('arialuni.ttf', 8);
445
446  printf(&quot;%s\n&quot;, SDL::TTF::font_face_family_name($font)); # will print &quot;Arial Unicode MS&quot;
447
448 </pre>
449
450 </div>
451 <h4 id="font_face_style_name">font_face_style_name</h4>
452 <div id="font_face_style_name_CONTENT">
453 <pre> my $font_face_style_name = SDL::TTF::font_face_style_name($font);
454
455 </pre>
456 <p>Get the current font face style name from the loaded font. This information is not for every font available. </p>
457 <p>Example:</p>
458 <pre> my $font = SDL::TTF::open_font('arialuni.ttf', 8);
459
460  printf(&quot;%s\n&quot;, SDL::TTF::font_face_style_name($font)); # will print &quot;Regular&quot;
461
462 </pre>
463
464 </div>
465 <h3 id="Glyphs">Glyphs</h3>
466 <div id="Glyphs_CONTENT">
467
468 </div>
469 <h4 id="glyph_is_provided">glyph_is_provided</h4>
470 <div id="glyph_is_provided_CONTENT">
471 <pre> my $glyph_is_provided = SDL::TTF::glyph_is_provided($font, $unicode_char);
472
473 </pre>
474 <p>Get the status of the availability of the glyph from the loaded font.</p>
475 <p>Returns: the index of the glyph in font, or 0 for an undefined character code.</p>
476 <p><strong>Note</strong>: You have to pass this unicode character either as UTF16/UCS-2 big endian without BOM, or with BOM as UTF16/UCS-2 big/little endian.</p>
477 <p><strong>Note</strong>: at least SDL_ttf 2.0.10 needed</p>
478 <p>Example:</p>
479 <pre> print(&quot;We have this char!\n&quot;) if SDL::TTF::glyph_is_provided($font, &quot;\0M&quot;);
480
481 </pre>
482
483 </div>
484 <h4 id="glyph_metrics">glyph_metrics</h4>
485 <div id="glyph_metrics_CONTENT">
486 <pre> my @glyph_metrics = @{ SDL::TTF::glyph_metrics($font, $unicode_char) };
487
488 </pre>
489 <p>Get desired glyph metrics of the UNICODE char from the loaded font.</p>
490 <p>See also: <a href="http://freetype.sourceforge.net/freetype2/docs/tutorial/step2.html">The FreeType2 Documentation Tutorial</a></p>
491 <p><strong>Note</strong>: You have to pass this unicode character either as UTF16/UCS-2 big endian without BOM, or with BOM as UTF16/UCS-2 big/little endian.</p>
492 <p>Example:</p>
493 <pre> my ($minx, $maxx, $miny, $maxy, $advance) = @{ SDL::TTF::glyph_metrics($font, &quot;\0M&quot;) };
494
495 </pre>
496
497 </div>
498 <h3 id="Text_metrics">Text metrics</h3>
499 <div id="Text_metrics_CONTENT">
500
501 </div>
502 <h4 id="size_text">size_text</h4>
503 <div id="size_text_CONTENT">
504 <pre> my ($width, $height) = @{ SDL::TTF::size_text($font, 'Hallo World!') };
505
506 </pre>
507
508 </div>
509 <h4 id="size_utf8">size_utf8</h4>
510 <div id="size_utf8_CONTENT">
511 <pre> my ($width, $height) = @{ SDL::TTF::size_utf8($font, 'Hallo World!') };
512
513 </pre>
514
515 </div>
516 <h4 id="size_unicode">size_unicode</h4>
517 <div id="size_unicode_CONTENT">
518 <pre> my ($width, $height) = @{ SDL::TTF::size_unicode($font, 'Hallo World!') };
519
520 </pre>
521
522 </div>
523 <h2 id="Font_Rendering">Font Rendering</h2>
524 <div id="Font_Rendering_CONTENT">
525
526 </div>
527 <h3 id="render_glyph_solid">render_glyph_solid</h3>
528 <div id="render_glyph_solid_CONTENT">
529
530 </div>
531 <h3 id="render_glyph_shaded">render_glyph_shaded</h3>
532 <div id="render_glyph_shaded_CONTENT">
533
534 </div>
535 <h3 id="render_glyph_blended">render_glyph_blended</h3>
536 <div id="render_glyph_blended_CONTENT">
537
538 </div>
539 <h3 id="render_text_solid">render_text_solid</h3>
540 <div id="render_text_solid_CONTENT">
541 <p><strong>Note</strong>: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=374062</p>
542
543 </div>
544 <h3 id="render_text_shaded">render_text_shaded</h3>
545 <div id="render_text_shaded_CONTENT">
546
547 </div>
548 <h3 id="render_text_blended">render_text_blended</h3>
549 <div id="render_text_blended_CONTENT">
550
551 </div>
552 <h3 id="render_utf8_solid">render_utf8_solid</h3>
553 <div id="render_utf8_solid_CONTENT">
554
555 </div>
556 <h3 id="render_utf8_shaded">render_utf8_shaded</h3>
557 <div id="render_utf8_shaded_CONTENT">
558
559 </div>
560 <h3 id="render_utf8_blended">render_utf8_blended</h3>
561 <div id="render_utf8_blended_CONTENT">
562
563 </div>
564 <h3 id="render_unicode_solid">render_unicode_solid</h3>
565 <div id="render_unicode_solid_CONTENT">
566
567 </div>
568 <h3 id="render_unicode_shaded">render_unicode_shaded</h3>
569 <div id="render_unicode_shaded_CONTENT">
570
571 </div>
572 <h3 id="render_unicode_blended">render_unicode_blended</h3>
573 <div id="render_unicode_blended_CONTENT">
574
575 </div>
576 <h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
577 <div id="AUTHOR_CONTENT">
578 <p>Tobias Leich [FROGGS]</p>
579
580 </div>
581 <h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
582 <div id="SEE_ALSO_CONTENT">
583 <p><a href="SDL-TTF-Font.html">SDL::TTF::Font</a>, <a href="http://search.cpan.org/perldoc?Unicode::String">Unicode::String</a>, <a href="SDL-Video.html">SDL::Video</a>, <a href="SDL-Surface.html">SDL::Surface</a></p>
584
585 </div>
586 </div>