Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: LDEF with multiple fonts Message-ID: <9069@hoptoad.uucp> Date: 23 Nov 89 20:59:03 GMT References: <13687@eerie.acsu.Buffalo.EDU> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 28 In article <13687@eerie.acsu.Buffalo.EDU> volaski@acsu.buffalo.edu () writes: >I am trying to implement a list with text that has multiple fonts. The standard >listDefProc allows for text, but it uses the current grafport's font. As a >result only one font, face, and style is allowed. > >I tried something simple like calling TextFont to change grafport characteristics >each time a drawMessage is sent to my LDEF. This doesn't work and I figure it is because my LDEF cannot accesss the DA's grafport. First of all, *please* try to restrict your messages to 79 characters per line. Thank you. I use TextFont, TextSize, and TextFace routinely in LDEFs, and I've never had any problem with them. You can in fact access and modify your owning window's grafPort, though of course you should do so with caution. So whatever problem you had while doing this must have been a product of some hidden bug in your code that made it appear to you that the TextFont call was not working. If you still have the code, you should pull it out and try again, and perhaps placing debugging breakpoints on TextFont and DrawText (or whatever you are using to draw text). This implementation of font changes seems like by far the easiest of the three approaches you mentioned. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "Every year, thousands of new Randoids join the ranks. Most tend to be either too-rich self-made tycoons or picked-on computer nerds (the romantic, heroic individualism of Rand's novels flatters the former and fuels the latter's revenge fantasies)." -- Bob Mack, SPY, July 1989