included images, and demo-expanding
[sdlgit/SDL_perl.git] / lib / SDL / Tool / Font.pm
index f22be01..ab8958e 100644 (file)
@@ -58,7 +58,9 @@ sub new {
                                        -bg => $option{-background} || $option{-bg};
                for (qw/ normal bold italic underline / ) {
                        if ($option{"-$_"}) {
-                               &{"SDL::TTFont::$_"}($$self{-font});
+                               
+                               SDL::TTFont->can($_)->($$self{-font});
+                               #&{$sub}($$self{-font});
                        }
                }
        } else {
@@ -75,7 +77,7 @@ sub DESTROY {
 sub print {
        my ($self,$surface,$x,$y,@text) = @_;
        croak "Tool::Font::print requires a SDL::Surface\n"
-               unless ($SDL::DEBUG && $surface->isa('SDL::Surface'));
+               unless ($surface->isa('SDL::Surface'));
        if ($$self{-font}->isa('SDL::Font')) {
                $$self{-font}->use();
                SDL::SFont::PutString( $$surface, $x, $y, join('',@text));