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

Goodday all. I'm working with the the GD module to create some animated gifs and i want to have extra fonts. In my documentation it says I have to compile the libgd file with true-type suppport on, and later call stringFT(), but i don't know how to do this. Can someone offer a solution? Best regards.

Replies are listed 'Best First'.
Re: GD fonts
by marto (Cardinal) on May 27, 2013 at 14:35 UTC

    The GD README states that you need to install the FreeType font rendering library as well as the other module prerequisites prior to installation to enable TrueType font support. The documentation also provides an example for calling stringFT():

    $gd->stringFT($black,'/dosc/windows/Fonts/pala.ttf',40,0,20,90, "hi there\r\nbye now", {linespacing=>0.6, charmap => 'Unicode', });