Re: Getting a list of available fonts?
- From: Havoc Pennington <hp redhat com>
- To: "M Razhov" <mrazhov mail ru>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Getting a list of available fonts?
- Date: 08 Oct 2001 10:15:43 -0400
"M Razhov" <mrazhov mail ru> writes:
Is it possible to get a list of available fonts? If I call
gdk_font_load() with -*-...*, I get one concrete (GDK_FONT_FONT)
font, with the name all stars.
IIRC in GTK 1.2 you have to use Xlib for this. Have a look at the
GtkFontSelection source code. Pango simplifies this a lot in the
future.
BTW, you probably want to use gdk_fontset_load(), which will get a
font appropriate for the current locale; gdk_font_load() will choose
an essentially random encoding, unless you hardcode an encoding in the
font name, but if you hardcode the encoding obviously the program
won't work in other locales.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]