I’m working on adding a Text feature to PXN8 so that users can add Text to their photos.
This isn’t as straightforward as I’d hoped. The Fonts installed on my local Windows development machine aren’t the same as those on the deployed server so, by necessity, I have to limit the choice of fonts the user can make.
Added to this is the problem that on the deployed server (A redhat ES box), ImageMagick’s ‘convert -list type’ command returns nothing as does Image::Magick->QueryFont().
Here’s what I did to ensure that ImageMagick correctly picks up any TrueType & ATM (GhostScript) fonts installed on a linux box…
- up2date gs
- up2date ghostscript-fonts
Then run Anthony Thiessen’s perl script to point ImageMagick at the installed fonts…
(the updatedb command is necessary because the perl script uses the ‘locate’ command to find installed fonts).
Run the script, redirecting the output to /usr/local/lib/ImageMagick-6.2.7/config/type.xml (that file should be empty or just contain the DOCTYPE element.
‘convert -list type’ and Image::Magick->QueryFont() should both work fine now and return a list of installed fonts.