
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. Thanks for hints, Colin

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(). ...

On Tuesday 14 June 2005 00:53, Synthetic Cartoonz wrote:
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(). ...
Hi Synthetic Cartoonz, good to hear from you. I've been quiet lately: fighting a Trojan on my old XP lap top; it has taken over my PC and I've had no luck in getting control over it. Looks like a reformat... These "intelligent" virus writers have damned near zero social IQ and ought to be taken out and shot. Anyway, thanks for the info. I've been ploughing through my books... I will follow up on your advice and get back to you, but it is 1.15 am again... Good night, and thanks again for such a prompt response. Regards, Colin
participants (2)
-
Colin Carter
-
Synthetic Cartoonz