3 # Copyright (C) 2003 Tels
4 # Copyright (C) 2004 David J. Goehrig
6 # Copyright (C) 2005 David J. Goehrig <dgoehrig\@cpan.org>
8 # ------------------------------------------------------------------------------
10 # This library is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU Lesser General Public
12 # License as published by the Free Software Foundation; either
13 # version 2.1 of the License, or (at your option) any later version.
15 # This library is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 # Lesser General Public License for more details.
20 # You should have received a copy of the GNU Lesser General Public
21 # License along with this library; if not, write to the Free Software
22 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 # ------------------------------------------------------------------------------
26 # Please feel free to send questions, suggestions or improvements to:
32 # basic testing of SDL::Tool::Font
35 unshift @INC, 'blib/lib','blib/arch';
43 plan( skip_all => "Failing test due to moving stuff around");
45 if ( SDL::Config->has('SDL_image')
46 && SDL::Config->has('SDL_ttf') ) {
50 ( SDL::Config->has('SDL_image')
52 : ' SDL_image support not compiled')
53 . ( SDL::Config->has('SDL_ttf')
55 : ' SDL_ttf support not compiled'));
58 use_ok( 'SDL::Tool::Font' );
60 can_ok ('SDL::Tool::Font', qw/
64 my $font = new SDL::Tool::Font
66 -ttfont => 'test/data/aircut3.ttf',
68 -fg => $SDL::Color::black,
69 -bg => $SDL::Color::black;
74 #my $aref = SDL::TTFSizeText( $font, $string);
75 #ok( defined($$aref[0]), "Testi width for SDL::TTFSizeText." );
76 #ok( defined($$aref[1]), "Test height for SDL::TTFSizeText." );
78 #utf8::encode($string);
79 #my $bref = SDL::TTFSizeUTF8( $font, $string);
80 #ok( defined($$bref[0]), "Test for width SDL::TTFSizeUTF8." );
81 #ok( defined($$bref[1]), "Test for height SDL::TTFSizeUTF8." );