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' );
Wikipedia says, the original Unifont was bitmapped font 16 px high. Looks like vectorized to TTF with pixels literally becoming squares (united to rectangles where possible). So rendering, without AA, to any size other than 16, 32, 48, ... will not likely be pretty, especially to smaller sizes (try changing size, above).
You can experiment with other TTF fonts and check if all required (now and in the future ;-) ) glyphs render w/o AA without ugly artifacts at chosen height. It's not totally impossible.
Maybe better go with bitmapped fonts. Note: these are monospaced, + different sizes differ in Unicode coverage. 'Size' parameter appears to be ignored by Imager. + Complex glyphs are also not very beautiful at small sizes.