ImageMagick & Installed Fonts

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…

  1. up2date gs
  2. up2date ghostscript-fonts
  3. updatedb

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.

Advertisements

2 thoughts on “ImageMagick & Installed Fonts

  1. Tim says:

    Hi, Walter.

    I sent you an e-mail a week or so ago about the All You Can Upload link at the bottom left of PXN8 not working. Any chance this will be fixed soon?

    You’ve got a great app there and I really love using it. Thanks!

    Tim

  2. sxoop says:

    Hi Tim,

    I didn’t get the email so I just spotted this. I’ll look into it.

    Walter

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: