1SDL::TTF::Font(3) User Contributed Perl Documentation SDL::TTF::Font(3)
2
3
4
6 SDL::TTF::Font - Font object type for SDL_ttf
7
9 TTF, Structure
10
13 my $font = SDL::TTF::Font->new($font_file, $point_size);
14
15 my $font = SDL::TTF::Font->new($font_file, $point_size, $face_index);
16
17 Load file for use as a font, at the given size. This can load TTF, OTF
18 and FON files. You can specify the face index of a font file containing
19 multiple faces.
20
21 Returns: a SDL::TTF::Font object. "undef" is returned on errors.
22
23 Example:
24
25 use SDL::TTF::Font;
26
27 my $font = SDL::TTF::Font->new('arial.ttf', 24);
28
30 See "AUTHORS" in SDL.
31
33 SDL::TTF
34
35
36
37perl v5.34.0 2021-07-22 SDL::TTF::Font(3)