Rach has asked for the wisdom of the Perl Monks concerning the following question:

um thanks i ran those test and for some reason it seems that i doesnt support any font format. Is there a way to change this? its supposed to come with the ability to format all those types of fonts.

Replies are listed 'Best First'.
Re: How to load a font?
by almut (Canon) on Jun 12, 2007 at 20:36 UTC

    What's the exact error message you're getting?  (Side note: it's always better to just cut-n-paste the message, rather than trying to paraphrase it in your own words. Sometimes, programs generate similar but distinct error messages. Knowing the exact wording helps those who want to help...)

    For example, just in case your specific instance of Imager wouldn't have truetype support, the error message would be:

    Cannot load /usr/local/fonts/arial.ttf: Font type not found

    Is that maybe the message you're getting?

    The docs say that you can test for truetype support like this:

    use Imager; print "Has truetype\n" if $Imager::formats{tt};

    Just an idea...

Re: How to load a font?
by Anonymous Monk on Jun 12, 2007 at 20:27 UTC
    The error message doesn't lie
Re: How to load a font?
by tonyc (Hermit) on Jun 14, 2007 at 01:02 UTC

    Imager can use either FreeType 1.x or 2.x for rendering TrueType fonts, and you need to have those libraries installed before installing Imager.

    The same applies to tiff, gif, png and jpeg file support.

      for some reason Imager cannot find the libraries it needs, so i assumed the computer didnt have them, and tried to install them, only to find out it does, i just have no idea where. and if i were able to find them, where would i put them to make it possible for Imager to read them?

        You don't say which platform on, so it's hard to be specific.

        Most Linux distributions, for example, will only install the shared libraries when you install say the "libpng" package, but Imager also needs the header files, which means you need to install -dev or -devel package too, eg, libfreetype6 on Debian gives you the Freetype 2 libraries, but you also need to install libfreetype6-dev to get the headers that Imager needs to build its freetype 2 code.