Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!ncar!csn!stan!marvin!toml From: toml@marvin.Solbourne.COM (Tom LaStrange) Newsgroups: comp.windows.x Subject: Problems freeing an XFontStruct Message-ID: Date: 11 Apr 91 23:09:16 GMT Sender: toml@Solbourne.COM (Tom LaStrange) Organization: Solbourne Computer, Inc. Lines: 25 I'm having problems freeing an XFontStruct, here's the code: GC gc; XFontStruct *fsp; gc = XCreateGC(dpy, win, 0, 0); fsp = XQueryFont(dpy, XGContextFromGC(gc)); XFreeFont(dpy, fsp); This generates the following protocol error: X Error of failed request: BadFont (invalid Font parameter) Major opcode of failed request: 46 (X_CloseFont) Resource id in failed request: 0x1500002 Serial number of failed request: 6 Current serial number in output stream: 11 I presume because the font ID in the XFontStruct is actually the graphics context ID and XFreeFont() assumes it's a font ID. So is it possible to free a font structure obtained using a GC rather than a font ID? -- (I kid you not)Tom LaStrange toml@Solbourne.COM