#!/usr/bin/perl -w
#	Font.pm
#	a SDL perl extension for SFont support

package SDL::Font;
use strict;
use SDL::sdlpl;

use vars qw(@ISA);

@ISA = qw(SDL::Surface);

sub new {
	my $proto = shift;
	my $class = ref($proto) || $proto;
	my $self = {};
	$self->{-fontname} = shift;
	$self->{-surface} = SDL::sdlpl::sdl_sfont_new_font($self->{-fontname});
	bless $self,$class;
	return $self;	

	my $self = shift;

sub use {
	my $self = shift;

sub text_width 
   return SDL::sdlpl::sdl_sfont_text_width(join('',@_));



=head1 NAME

SDL::Font - a SDL perl extension


  $font = new Font "Font.png";


	SDL::Font provides a mechanism for loading and using SFont style
fonts.  To create a new font, simply create a new instance of the class
Font, passing it the name of the image file that contains the SFont.

	To use the font, call the use method of the font instance as
shown above.  Perl will automagically deallocate all of the buffers.
You must create and use a font prior to printing on any surface.
For further details see the file SFont-README in this distribution.

=head1 AUTHOR

David J. Goehrig

=head1 SEE ALSO

perl(1) SDL::Surface(3)