X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=sdlgit%2FSDL-Site.git;a=blobdiff_plain;f=pages%2FSDL-TTF.html-inc;fp=pages%2FSDL-TTF.html-inc;h=91fdfbfddc7d3ea5ebb17f6639de1a6941c70aaa;hp=7693e8ea37ea200cdf03f7638a655ccd95974de0;hb=fcf60e89673f759573b518df17a379d1a9436b4c;hpb=e785862422f3e827a242fc244bd57b23443887ce diff --git a/pages/SDL-TTF.html-inc b/pages/SDL-TTF.html-inc index 7693e8e..91fdfbf 100644 --- a/pages/SDL-TTF.html-inc +++ b/pages/SDL-TTF.html-inc @@ -212,7 +212,7 @@ After calling this the SDL::TTF functions should not be used, excepting my $font = SDL::TTF::open_font($font_file, $point_size); -

Load file for use as a font, at the given size. This is actually SDL::TTF::open_font_index(..., ..., $index = 0). This can load TTF and FON files.

+

Load file for use as a font, at the given size. This is actually SDL::TTF::open_font_index(..., ..., $index = 0). This can load TTF, OTF and FON files.

Returns: a SDL::TTF::Font object. undef is returned on errors.

Example:

 use SDL::TTF;
@@ -634,7 +634,7 @@ version 2.3.5

SDL::init(SDL_INIT_VIDEO); SDL::TTF::init(); my $display = SDL::Video::set_video_mode(640, 480, 32, SDL_SWSURFACE); - my $font = SDL::TTF::open_font('test/data/aircut3.ttf', '24'); + my $font = SDL::TTF::open_font('somefont.ttf', '24'); die 'Coudnt make font '. SDL::get_error if !$font; my $surface = SDL::TTF::render_text_solid($font, 'Hallo!', SDL::Color->new(0xFF,0xFF,0xFF)); SDL::Video::blit_surface($surface, SDL::Rect->new(0, 0, 640, 480), $display, SDL::Rect->new(10, 10, 640, 480));