From: Austin Ziegler Date: 2005-11-22T01:19:58+09:00 Subject: Re: How to get font info on *nix? On 11/21/05, rmagick@gmail.com wrote: > I'm thinking about writing a Ruby extension for Linux/*BSD/Darwin to > enumerate all the fonts (Postscript and TTF) that are installed, along > with their attributes. Given such an extension I could write a Ruby > program to generate a custom ImageMagick font config file. > > Can somebody enlighten me about where to start? Is there an existing > library I can leverage? I found fontconfig (www.fontconfig.org) but I'm > not sure that's right. Take a look near the top of the PDF::Writer main file (lib/pdf/writer.rb) and you'll see what I do in order to find existing fonts. It's imperfect and somewhat untested, but you may need to parse the fonts themselves to determine the relevant information. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca