Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!uwm.edu!bionet!agate!shelby!csli!poser From: poser@csli.Stanford.EDU (Bill Poser) Newsgroups: comp.windows.x Subject: XTextExtents Keywords: XTextExtents ascent descent Message-ID: <13966@csli.Stanford.EDU> Date: 6 Jun 90 23:05:19 GMT Sender: poser@csli.Stanford.EDU (Bill Poser) Organization: Center for the Study of Language and Information, Stanford U. Lines: 19 I am having trouble with XTextExtents in X11R3. I give it a single character in order to obtain information necessary to center the character but, but the ascent, descent, lbearing, and rbearing returned are all zero. Am I doing something wrong, or is there a bug in XTextExtents? The relevant code fragment is: XCharStruct strprops; /* Extent information */ int dh; /* Unused */ int fa; /* Unused */ int fd; /* Unused */ extern XFontStruct *fontinfo; XTextExtents(fontinfo,w->m_type,1,&dh,&fa,&fd,&strprops); where w->m_type is the character about which I want information. Bill