1 package Imager::Font::W32;
4 use vars qw($VERSION @ISA);
5 @ISA = qw(Imager::Font);
12 XSLoader::load('Imager::Font::W32', $VERSION);
16 push @ISA, 'DynaLoader';
17 bootstrap Imager::Font::W32 $VERSION;
21 # called by Imager::Font::new()
22 # since Win32's HFONTs include the size information this
25 my ($class, %opts) = @_;
27 return bless \%opts, $class;
31 my ($self, %opts) = @_;
33 my @bbox = i_wf_bbox($self->{face}, $opts{size}, $opts{string}, $opts{utf8});
40 if (exists $input{channel}) {
41 i_wf_cp($self->{face}, $input{image}{IMG}, $input{x}, $input{'y'},
42 $input{channel}, $input{size},
43 $input{string}, $input{align}, $input{aa}, $input{utf8});
46 i_wf_text($self->{face}, $input{image}{IMG}, $input{x},
47 $input{'y'}, $input{color}, $input{size},
48 $input{string}, $input{align}, $input{aa}, $input{utf8});
63 Imager::Font::W32 - font support using C<GDI> on Win32
69 my $img = Imager->new;
70 my $font = Imager::Font->new(face => "Arial", type => "w32");
72 $img->string(... font => $font);
76 This provides font support on Win32.
80 Unfortunately, older versions of Imager would install
81 Imager::Font::Win32 even if Win32 wasn't available, and if no font was
82 created would succeed in loading the module. This means that an
83 existing Win32.pm could cause a probe success for Win32 fonts, so I've
88 Tony Cook <tony@imager.perl.org>