In a nutshell:
Which package(s) must I install on Ubuntu 16.04 server to have full font-support for perl-modules that can draw text into images?
I have Ubuntu 16.04.1 LTS (server, i.e. without GUI) running on a virtual machine, and I have an old Ubuntu 14.04 server (also without GUI) from which I want to move some applications to the new 16.04 machine. The application described below is working on the old machine, but not on the new one.
I have a webserver (apache) running on this machine, and there I have a website that contains an e-mail-form with a captcha (an image displaying some text). I generate this captcha with a perl script using the cpan module Imager.
In this perl script is this command that loads a font so that I later can use it to draw letters into an image:
my $font = Imager::Font->new(file=>$font_filename) or die "Cannot load $font_filename: ", Imager->errstr;
where $font_filename is the filename of an existing ttf-font. (I checked this. The font is there and it is readable.) But this command fails. I get this error message:
Cannot load /path/to/fontdir/opensans-bold.ttf: No font drivers enabled that can support this file, rebuild Imager with any of ft2 (FreeType 2.x), tt (FreeType 1.x) to use this font file at ./myPerlScript.pl line 123.
The message says that I should "rebuild Imager with any of ft2 (FreeType 2.x), tt (FreeType 1.x)".
I don't know how to do this.
I think that I need to install a package that contains fonts-support for ubuntu 16.04 and then re-install the cpan module Imager.
If there is really just a package missing: Which one is it?
If the problem is something else: What must I do to enable Imager to work with my ttf-font?