The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SYNOPSIS

   my $fontname = 'Arial';

   find_ttf( $fontname);

   my $fontdir  = '/home/myself/fonts';
   my $fontdir2 = '/home/myself/.fonts';
   
   push @LEOCHARRE::FontFind::PATH, $fontdir, $fontdir2;
   
   LEOCHARRE::FontFind::_cache_reset();   

   my $abs_font = find_ttf( $fontname, $fontdir, $fontdir2 );

   

DESCRIPTION

Why?

Because I was rendering text with imagemagick, and what was taking 3 seconds each time was looking up for fonts. This makes it immediate.

CAVEATS

AUTHOR

Leo Charre leocharre at cpan dot org

LICENSE

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, i.e., under the terms of the "Artistic License" or the "GNU General Public License".

DISCLAIMER

This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See the "GNU General Public License" for more details.