RE: [gtk-list] Fonts / GDK / Querying / how?




> In gtk 1.0.4, gtkstyle, there's a line of code to set the font 
> 
> gtk_font_load ("-adobe-helvetica-medium-r-normal--*-120-*-*.....");
>  
> Questions:
> 
> Is there a way to query the system for the list of fonts that are
> available?

XListFonts() - see the man page.

> Where do the fonts reside on the system? 

Usually somewhere in the X directories. /usr/X11R6/lib/X11/fonts on
my system (Debian 2). I think something like 'xset fp' will list the
current font search path.

> How does the above line translate to the font on the system? 

Look at fonts.dir in each of the font directories. And install the
xbooks package and look at the X Logical Font Description (XLFD)
documentation.

> I have a /usr/lib/texmf/texmf/fonts/afm/adobe/helvetic directory ..
> but I don't see the connection.  Can someone give me a push down the
> correct trail so I can pick up the scent?

I think TeX uses its own font setup, separate from X. Though I don't
know much about TeX.

> 
>  -Eric

You may also want to look at GTK 1.1, which has the
GtkFontSelectionDialog widget.

Oh yes, I also wrote a GTK version of 'xfontsel', using this widget,
which is at:
   http://www.comp.lancs.ac.uk/~damon/fontsel/index.html

That works with GTK 1.0.x as well.

Damon




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]