Too Brief Before? -- fonts in win32

Folks:

In one of the many Ruby libs, there must be an api to return the available
fonts on a windoze machine, you know … like xlsfonts does on my linux box.

If anyone could tell me where I might find it, I would appreciate it.

Thanks
Alan Walkington

FXRuby has FOX::FXFontDialog to pop up the font list. I don’t know of
any non-UI-based way of getting that information (other than reading
the Fonts directory, but that’s going to provide only limited
information).

-austin
– Austin Ziegler, austin@halostatue.ca on 2002.10.25 at 22.16.44

“Alan (Ursus Major)” ursus@walkington.org snivelled in message
news:Timu9.1466214$w17.144871@post-02.news.easynews.com

Folks:

In one of the many Ruby libs, there must be an api to return the available
fonts on a windoze machine, you know … like xlsfonts does on my linux
box.

If anyone could tell me where I might find it, I would appreciate it.

Thanks
Alan Walkington

Thanks all, expecially Mat

···

require “tkfont”
TkFont.families.each{|f| p f}

The above ,executed in my SciTE editor, tells me all I want to know.
Alan Walkington

Thanks much

Alan

“Austin Ziegler” austin@halostatue.ca wrote in message
news:20021026021802.KLIV1527.tomts19-srv.bellnexxia.net@hogwarts…

···

FXRuby has FOX::FXFontDialog to pop up the font list. I don’t know of
any non-UI-based way of getting that information (other than reading
the Fonts directory, but that’s going to provide only limited
information).

-austin
– Austin Ziegler, austin@halostatue.ca on 2002.10.25 at 22.16.44

You can also do it with Ruby/Tk, which has the advantage of being
bundled with the Ruby distribution. For example:

require ‘tkfont’

allMyFonts = TkFont.families

BTW I just tried this, and was pleasantly surprised at how easy it was.
I’ve done a lot of Tkinter (Python) programming, and in Python you have
to at least instantiate a root window before you can get a list of
fonts. That always seemed kind of dumb to me.

···

On Sat, Oct 26, 2002 at 11:18:07AM +0900, Austin Ziegler wrote:

FXRuby has FOX::FXFontDialog to pop up the font list. I don’t know of
any non-UI-based way of getting that information (other than reading
the Fonts directory, but that’s going to provide only limited
information).


Matt Gushee When a nation follows the Way,
Englewood, Colorado, USA Horses bear manure through
mgushee@havenrock.com its fields;
http://www.havenrock.com/ When a nation ignores the Way,
Horses bear soldiers through
its streets.

                        --Lao Tzu (Peter Merel, trans.)

“Matt Gushee” mgushee@havenrock.com enlightened us all in message
news:20021026025618.GA525@swordfish…

You can also do it with Ruby/Tk, which has the advantage of being
bundled with the Ruby distribution. For example:

require ‘tkfont’

allMyFonts = TkFont.families

Oh yes … very much yes
Thanks a bunch,

Alan Walkington
Idaho Falls, Id (and)
Campbell, Ca.

> –

···

On Sat, Oct 26, 2002 at 11:18:07AM +0900, Austin Ziegler wrote:
Matt Gushee When a nation follows the Way,
Englewood, Colorado, USA Horses bear manure through
mgushee@havenrock.com its fields;
http://www.havenrock.com/ When a nation ignores the Way,
Horses bear soldiers through
its streets.

                        --Lao Tzu (Peter Merel, trans.)