pods::...::Font(3pm)
π NAME π
Bestie, welcome to the pods::...::Font(3pm) page from User Contributed Perl Documentation β yes, we're in Perl-docs territory, and this one is all about the font object type for SDL_ttf. The actual NAME line is SDL::TTF::Font - Font object type for SDL_ttf. Periodt. π
π CATEGORY π
- TTF, Structure β that's the category, no cap.
π METHODS π
π οΈ CONSTRUCTOR π οΈ
Okay so you make one like this, bestie:
my $font = SDL::TTF::Font->new($font_file, $point_size);
my $font = SDL::TTF::Font->new($font_file, $point_size, $face_index);
It loads a file for use as a font, at the size you give it. This can load TTF, OTF and FON files. You can also specify the face index of a font file that contains multiple faces. Iconic behavior, honestly. β¨
Returns: a SDL::TTF::Font object. undef is returned on errors. π
Example time β copy it exactly, iykyk:
use SDL::TTF::Font;
my $font = SDL::TTF::Font->new('arial.ttf', 24);
π«Ά AUTHORS π«Ά
See "AUTHORS" in SDL. That's the whole section, and it ate. π
π¦ SEE ALSO π¦
SDL::TTF β go look, bestie. π
Stay iconic, and remember: this pods::...::Font(3pm) page was brought to you by perl v5.42.3, dated 2026-08-19. Mwah. π
π¦ where this page comes from
- ubuntu stonking: libsdl-perl 2.548-6build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms