summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlperl0/lib/Imager/Font/Win32.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlperl0/lib/Imager/Font/Win32.pm')
-rwxr-xr-xMaster/tlpkg/tlperl0/lib/Imager/Font/Win32.pm61
1 files changed, 61 insertions, 0 deletions
diff --git a/Master/tlpkg/tlperl0/lib/Imager/Font/Win32.pm b/Master/tlpkg/tlperl0/lib/Imager/Font/Win32.pm
new file mode 100755
index 00000000000..790d9ae8b09
--- /dev/null
+++ b/Master/tlpkg/tlperl0/lib/Imager/Font/Win32.pm
@@ -0,0 +1,61 @@
+package Imager::Font::Win32;
+use strict;
+use vars qw(@ISA $VERSION);
+@ISA = qw(Imager::Font);
+
+$VERSION = "1.005";
+
+# called by Imager::Font::new()
+# since Win32's HFONTs include the size information this
+# is just a stub
+sub new {
+ my ($class, %opts) = @_;
+
+ return bless \%opts, $class;
+}
+
+sub _bounding_box {
+ my ($self, %opts) = @_;
+
+ my @bbox = Imager::i_wf_bbox($self->{face}, $opts{size}, $opts{string}, $opts{utf8});
+}
+
+sub _draw {
+ my $self = shift;
+
+ my %input = @_;
+ if (exists $input{channel}) {
+ Imager::i_wf_cp($self->{face}, $input{image}{IMG}, $input{x}, $input{'y'},
+ $input{channel}, $input{size},
+ $input{string}, $input{align}, $input{aa}, $input{utf8});
+ }
+ else {
+ Imager::i_wf_text($self->{face}, $input{image}{IMG}, $input{x},
+ $input{'y'}, $input{color}, $input{size},
+ $input{string}, $input{align}, $input{aa}, $input{utf8});
+ }
+}
+
+
+sub utf8 {
+ return 1;
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+Imager::Font::Win32 - uses Win32 GDI services for text output
+
+=head1 SYNOPSIS
+
+ my $font = Imager::Font->new(face=>"Arial");
+
+=head1 DESCRIPTION
+
+Implements font support using Win32 GDI calls. See Imager::Font for
+usage information.
+
+=cut