Skip Menu |
 

This queue is for tickets about the Imager CPAN distribution.

Report information
The Basics
Id: 65386
Status: resolved
Priority: 0/
Queue: Imager

People
Owner: Nobody in particular
Requestors: perl [...] pied.nu
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.80
Fixed in: (no value)

Attachments
Philip_Gwyn.Imager.tt-vs-ft2.01.patch



Subject: TT hides FT2 for font type detection
Download (untitled) / with headers
text/plain 365b
If ft2 is installed, but not tt, Imager fails to autodetect the font type. Example code: my $arial = Imager::Font->new( file => "arial.ttf", size => 8, color => $bg ) or die "Can't load arial.ttf: $Imager::ERRSTR"; Included patch fixes the problem.
Subject: Philip_Gwyn.Imager.tt-vs-ft2.01.patch
--- Imager-0.80/lib/Imager/Font.pm 2011-01-14 21:18:44.000000000 -0500 +++ Imager-0.80-PG/lib/Imager/Font.pm 2011-02-02 18:26:01.040530984 -0500 @@ -78,7 +78,7 @@ undef $type; my $re = $drivers{$drv}{files} or next; if ($file =~ /$re/i) { - if (eval { require $drivers{$drv}{module}; 1 }) { + if (eval { require $drivers{$drv}{module}; 1 } and !( $drivers{$drv}{checktype} && !$Imager::formats{$drv} )) { $type = $drv; last; }
Download (untitled) / with headers
text/plain 488b
On Wed Feb 02 19:47:30 2011, GWYN wrote: Show quoted text
> If ft2 is installed, but not tt, Imager fails to autodetect the font type. > > Example code: > > my $arial = Imager::Font->new( > file => "arial.ttf", > size => 8, > color => $bg > ) or die "Can't load arial.ttf: $Imager::ERRSTR"; > > Included patch fixes the problem.
Thanks, applied and released as part of Imager 0.81. Tony


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.