Path: utzoo!attcan!uunet!seismo!beno!denio From: denio@beno.CSS.GOV (Dennis O'Neill) Newsgroups: comp.windows.x Subject: Finding name of installed font Keywords: Fonts, string length in pixels Message-ID: <48616@seismo.CSS.GOV> Date: 8 Feb 90 18:03:45 GMT Sender: usenet@seismo.CSS.GOV Lines: 28 How does one determine the name of the currently-loaded font? Specifically, what I'm trying to do is set up a sequence of Xw widgets as follows: statictext statictext valuator, all inside a rowcol. The width of each statictext is to be determined by the length of certain strings. To do this, it looks like I have to: o specify the widths of the statictext widgets, for which I must o determine the width in pixels of a certain string to be displayed. This seems to be doable using width = XTextWidth (fontstruct, string, string_length) for which I need to o find out the fontstruct using fontstruct = XLoadQueryFont (display, fontname) for which I need to o learn the name of the installed font. How do I do this last (the last shall be first ...) thing? I know how to do this if I've installed the font myself first; my problem is to have the procedure find the name of the installed font for itself. Is there an easier way around all this? Dennis O'Neill denio@seismo.css.gov, denio@s3reston.scubed.com 703-476-5197