Blame t/afm.t

Packit 2638f0
require Font::AFM;
Packit 2638f0
Packit 2638f0
eval {
Packit Service ce5456
   $font = Font::AFM->new("phvr");
Packit 2638f0
};
Packit 2638f0
if ($@) {
Packit 2638f0
   if ($@ =~ /Can't find the AFM file for/) {
Packit 2638f0
	print "1..0 # Skipped: Can't find required font\n";
Packit 2638f0
	print "# $@";
Packit 2638f0
   } else {
Packit 2638f0
	print "1..1\n";
Packit 2638f0
        print "# $@";
Packit 2638f0
	print "not ok 1 Found font OK\n";
Packit 2638f0
   }
Packit 2638f0
   exit;
Packit 2638f0
}
Packit 2638f0
print "1..1\n";
Packit 2638f0
Packit 2638f0
$sw = $font->stringwidth("Gisle Aas");
Packit 2638f0
Packit 2638f0
if ($sw == 4279) {
Packit Service ce5456
    print "ok 1 Stringwith for phvr seems to work\n";
Packit 2638f0
} else {
Packit 2638f0
    print "not ok 1 The stringwidth of 'Gisle Aas' should be 4279 (it was $sw)\n";
Packit 2638f0
}
Packit 2638f0