1 package Imager::Font::W32;
4 use vars qw($VERSION @ISA);
5 @ISA = qw(Imager::Font);
11 XSLoader::load('Imager::Font::W32', $VERSION);
14 # called by Imager::Font::new()
15 # since Win32's HFONTs include the size information this
21 color => Imager::Color->new(255, 0, 0),
26 return bless \%opts, $class;
30 my ($self, %opts) = @_;
32 my @bbox = i_wf_bbox($self->{face}, $opts{size}, $opts{string}, $opts{utf8});
34 Imager->_set_error(Imager->_error_as_msg);
45 if (exists $input{channel}) {
46 return i_wf_cp($self->{face}, $input{image}{IMG}, $input{x}, $input{'y'},
47 $input{channel}, $input{size},
48 $input{string}, $input{align}, $input{aa}, $input{utf8});
51 return i_wf_text($self->{face}, $input{image}{IMG}, $input{x},
52 $input{'y'}, $input{color}, $input{size},
53 $input{string}, $input{align}, $input{aa}, $input{utf8});
72 Imager::Font::W32 - font support using C<GDI> on Win32
78 my $img = Imager->new;
79 my $font = Imager::Font->new(face => "Arial", type => "w32");
81 $img->string(... font => $font);
85 This provides font support on Win32.
89 Unfortunately, older versions of Imager would install
90 Imager::Font::Win32 even if Win32 wasn't available, and if no font was
91 created would succeed in loading the module. This means that an
92 existing Win32.pm could cause a probe success for Win32 fonts, so I've
97 Tony Cook <tonyc@cpan.org>
101 Imager, Imager::Font.