13 Jun
2005
13 Jun
'05
14:53
On Monday 13 June 2005 10:16, Colin Carter wrote:
Hi, I see the following X Window functions: XLoadQueryFont() XSetFont() XUnloadFont() XFreeFont() and of course one uses a XFontStruct to hold the info.
But, does anybody know how to load a font structure with the values of the current font. i.e. How do I find out what the current font is? I only want Xlib or Xt functions.
http://www.sbin.org/doc/Xlib/chapt_06.html ... If the font ID passed to the XQueryFont() routines is of type GContext, the information about the font associated with the specified GC is returned. This is how you get information about the default font, which is always loaded. Pass the value returned by XGContextFromGC(DefaultGC(display, screen_num)) to XQueryFont(). ...