Ano-Tech Computers
Enter keyword:

Image::Magick can't find its fonts
Problem:
When trying to use the "Annotate" function in Image::Magick, no text appears and the result string yields an error message complaining that the specified font can not be found in "/usr/share/ghostscript/fonts"
 
Solution:
This is a brainfart by Redhat. First of all, the Annotate feature relies on the package "ghostscript-fonts" to be installed. Secondly, after installing that package the fonts live in a completely different directory.

Fix the problem by creating a symbolic link like this:
"ln -s /usr/share/fonts/default/Type1 /usr/share/ghostscript/fonts"

Finally, make sure that you are in fact referring to a font known to Image::Magick. You can get a list of supported fonts using the following Perl script:

#!/usr/bin/perl
use Image::Magick;
my $image = Image::Magick->new();
my @fonts = $image->QueryFont();
foreach $font (@fonts) { print $font . "\n"; }

 
Discuss this solution
Did this article solve your problem? Yes No Did not apply

We welcome anyone who is willing to contribute to this public knowledge base, contact siteadmin@atc.no if you have information you would like to share. The idea is not to replace the commercial support sites, but to publish those hard-to-find solutions you've found yourself looking for over and over again.

Show all articles