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 character
  • Imager::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