|
|
|
|
| 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"; }
|
|
|
|
|
|
This is free technical advice without any warranties.
Use at your own risk. Solutions offered may not apply to your particular problem at all.
Opinions and views expressed in the articles are the authors' personal
and may not necessarily reflect or coincide with those of Ano-Tech Computers.
We take no responsibility if anything bad happens from following any of
the intructions given. If you don't understand and accept this, please
contact us for personal assistance instead.
To read our full disclaimer, go
here.
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