Path: utzoo!censor!geac!jtsv16!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!NUSVM.BITNET!ISSLCK From: ISSLCK@NUSVM.BITNET (Law Chee Keong) Newsgroups: comp.windows.x Subject: FONT PROBLEMS Message-ID: <8911080816.AA01695@expo.lcs.mit.edu> Date: 8 Nov 89 08:31:31 GMT Organization: The Internet Lines: 33 This is a question about fonts. Given a variable of type XFontStruct *, I must determine what kind of font it is, (eg. its name, whether it is italic, bold or normal, and also its point size). Now, I am able to tell its point size through the XFontProp stucture, but how am I suppose to know its name (in char* format) and whether it is bold, normal or italic? A related question to this problem has to do with the Font id (fid) field in the XFontStruct variable. My guess is that the font id is a unique identifier to identify the font structure and *NOT* the type of the font right? So let's say I do this: XFontStruct *font1, *font2; font1 = XLoadQueryFont( dpy, "Fixed" ); font2 = XLoadQueryFont( dpy, "Fixed" ); Okay, what I get is font1->fid != font2->fid. In other words, although font1 and font2 are actually identical fonts, their fid is different. What I need is some kind of mechanism which tells me that font1 and font2 are one and the same. (ie. they are the same font type) Can anyone give me help and suggestions?? I am at a lost as to how to get around this font identification problem. -- C.K. Law Institute of Systems Science, NUS Singapore