Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!ATHENA.MIT.EDU!swick From: swick@ATHENA.MIT.EDU (Ralph R. Swick) Newsgroups: comp.windows.x Subject: Re: How to change font using toolkit Message-ID: <8808291456.AA09191@LYRE.MIT.EDU> Date: 29 Aug 88 14:56:50 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: DEC/MIT Project Athena Lines: 21 Date: 26 Aug 88 22:31:08 GMT From: okstate!romed!drd!mark@rutgers.edu (Mark Lawrence) Would some kind soul please send me a snippet of code that illustrates how a font gets changed in a program that uses Xtoolkit. If you're changing the font for a widget before it is created, you should arrange for the appropriate resource specification to be added to your resource database (e.g. via xrdb). If you're changing the font for a widget after it has been created, you should use XtSetValues. Is the XtConvert routine what I want? The widget documentation says that setting XtNfont requires an argument of type FontInfo*. Where is that defined? The documentation for Xaw is in error. The correct data type is XFontStruct*. You can use the resource type conversion machinery to obtain one of these, if you wish; simply declare an application resource of type XtRFontStruct and then the string-to-fontstruct conversion will be called automatically when/if necessary.