use strict; use warnings; use utf8; use Imager; my $im = Imager -> new( xsize => 400, ysize => 200 ) -> box( filled => 1, color => 'white' ) -> to_paletted( make_colors => 'mono' ); my $text = 'JORDBÆR PÅ FLØDE (jordbær på fløde)'; my $y = 50; $im-> string( x => 50, y => $y += 25, string => $text, font => $_, color => 'black', size => 16 ) for map { Imager::Font-> new( file => $_, type => 'ft2' ) or die Imager-> errstr } ( 'unifont-10.0.06.ttf', 'ucs-fonts/6x9.bdf', 'ucs-fonts/6x12.bdf', 'ucs-fonts/8x13.bdf', ); $im-> write( file => 'test.png' );