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. Advertisements

  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. Advertisements

  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. Advertisements

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:
    754
    Vasanth
    Jun 28, 2004
  2. Karl Hungus

    Font class, external font files question

    Karl Hungus, Feb 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    725
    Karl Hungus
    Feb 4, 2004
  3. =?Utf-8?B?Tmlja3k=?=
    Replies:
    2
    Views:
    886
    Matt Berther
    Feb 20, 2005
  4. Michael Glavitsch
    Replies:
    1
    Views:
    951
    Roedy Green
    Jul 15, 2003
  5. Nick Spinel
    Replies:
    0
    Views:
    1,077
    Nick Spinel
    Jul 25, 2003
  6. gino
    Replies:
    3
    Views:
    4,466
    Mike Smith
    Jul 11, 2004
  7. mttc
    Replies:
    2
    Views:
    2,677
    Roedy Green
    Jul 3, 2009
  8. ilya

    get CPU info, RAM info

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