Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > How to get font info on *nix?

Reply
Thread Tools

How to get font info on *nix?

 
 
rmagick@gmail.com
Guest
Posts: n/a
 
      11-21-2005
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.

 
Reply With Quote
 
 
 
 
Austin Ziegler
Guest
Posts: n/a
 
      11-21-2005
On 11/21/05, http://www.velocityreviews.com/forums/(E-Mail Removed) <(E-Mail Removed)> 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 * (E-Mail Removed)
* Alternate: (E-Mail Removed)


 
Reply With Quote
 
 
 
 
Timothy Hunter
Guest
Posts: n/a
 
      11-22-2005
Austin Ziegler wrote:
> 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.


Verrrry interesting...Thanks, Austin!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Swing Font, it's Java Font? ot native? how install new font? mttc Java 2 07-03-2009 07:29 PM
How to get the text in html tag.like<div...><font...>Text</font></ =?Utf-8?B?Tmlja3k=?= ASP .Net 2 02-20-2005 03:03 PM
Font class, external font files question Karl Hungus ASP .Net 1 02-04-2004 04:26 PM
physical font specified but true type font file not available Michael Glavitsch Java 1 07-15-2003 07:09 PM



Advertisments