FT2(3pm)
π FT2(3pm) β like, the manual page for Imager::Font::FT2 π
okay so this is FT2, a page from section 3pm of the perl docs (that's "perl modules", bestie, not "3pm in the afternoon" π). it's all about making fonts work with FreeType 2, and it's lowkey short but every word ate π
β¨ NAME β¨
Imager::Font::FT2 β font support using FreeType 2 π
yeah. that's it. that's the name. iconic behaviour honestly.
πΈ SYNOPSIS πΈ
here's the whole vibe in code form, copied exactly so you can just yeet it into your script:
use Imager;
my $img = Imager->new;
my $font = Imager::Font->new(file => "foo.ttf", type => "ft2");
$img->string(... font => $font);
so you make an image, you make a font with file => "foo.ttf" and type => "ft2", and then you draw strings with it. that's the whole plot π¦
π§ DESCRIPTION π§
This provides font support on FreeType 2. periodt. that's literally the whole description, no cap β it's the FreeType 2 font backend for Imager, and it does exactly what it says on the tin π
π CAVEATS π
okay bestie, storytime, because this one's a little mess π
Unfortunately, older versions of Imager would install "Imager::Font::FreeType2" even if FreeType 2 wasn't available β and if no font was created, it would succeed in loading the module. yes, you read that right. it would load and be like "all good β¨" while FreeType 2 was literally not there. main character energy of the worst kind π
This means that an existing "FreeType2.pm" could cause a probe success for supported font files, so I've renamed it.
so if you've got some old FreeType2.pm lying around, that's the ghost causing your fake success. the module got renamed to fix it. no cap, that's the actual fix, that's the whole reason π
π AUTHOR π
Tony Cook <tonyc@cpan.org> β the icon who built this and then wrote the caveat apologising for the previous chaos. we love accountability π«Ά
π SEE ALSO π
Imagerβ the big one, the parent, the main characterImager::Fontβ where fonts actually get made
go read those next, iykyk π
and that's the page, bestie!! π this one shipped as part of perl v5.42.3, dated 2026-08-19 β so yeah, freshly stamped and everything πβ¨π slay, go render some text π¦
π¦ where this page comes from
- ubuntu stonking: libimager-perl 1.035+dfsg-1 Β· 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