[comp.windows.x] Server Guru Question -- FontPtr to font name

garfinke@hpfcda.HP.COM (Dan Garfinkel) (02/10/90)

This questions is for server gurus familiar with the font loading stuff.

Give a FontPtr, is there a call somewhere in the server to get the 
font name (as supplied by the client)?  If not, has anyone written
such a routine?  If not, could someone give me some advice as to how 
to crawl through the servers internal data structures to find this 
information? 

Thanks,
	Dan Garfinkel (garfinke@hpfcda.hp.com)

keith@EXPO.LCS.MIT.EDU (Keith Packard) (02/13/90)

> Give a FontPtr, is there a call somewhere in the server to get the 
> font name (as supplied by the client)?

There is no direct call to retrieve the font name.  Most fonts will have
a font-property "FONT" which containts a name which can be used to lookup the
font.  Run through the list of font properties, looking for the one
with name == MakeAtom ("FONT", 4, 1).

Note that this name is the "canonical" name of the font; it is unlikely to
match the string used to open the font, which typically contains wild-card
characters or is an alias name.

Keith Packard
MIT X Consortium