How to get font info on *nix?

Discussion in 'Ruby' started by rmagick@gmail.com, Nov 21, 2005.

  1. Guest

    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.
    , Nov 21, 2005
    #1
    1. Advertising

  2. On 11/21/05, <> 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 *
    * Alternate:
    Austin Ziegler, Nov 21, 2005
    #2
    1. Advertising

  3. 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!
    Timothy Hunter, Nov 22, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vasanth
    Replies:
    0
    Views:
    547
    Vasanth
    Jun 28, 2004
  2. =?Utf-8?B?Tmlja3k=?=
    Replies:
    2
    Views:
    710
    Matt Berther
    Feb 20, 2005
  3. Replies:
    13
    Views:
    636
    Bryan Castillo
    Oct 28, 2004
  4. mttc
    Replies:
    2
    Views:
    2,387
    Roedy Green
    Jul 3, 2009
  5. ilya

    get CPU info, RAM info

    ilya, Apr 8, 2010, in forum: Java
    Replies:
    43
    Views:
    5,978
    Mike Schilling
    Apr 19, 2010
Loading...

Share This Page