Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!usc!brutus.cs.uiuc.edu!lll-winken!ames!haven!decuac!shlump.nac.dec.com!tallis!mcafee From: mcafee@tallis.dec.com (Steve McAfee) Newsgroups: comp.sys.amiga.tech Subject: Re: Fonts and freeing memory Message-ID: <7536@shlump.nac.dec.com> Date: 17 Jan 90 15:22:22 GMT Sender: newsdaemon@shlump.nac.dec.com Distribution: usa Organization: Digital Equipment Corporation Lines: 31 In article <5125@amiga.UUCP>, kodiak@amiga.UUCP (Robert R. Burns) writes... >In article <145@ccave.UUCP> root@ccave.UUCP (Juergen Hermann) writes: >)You MUST use OpenFont() to look for resident fonts before ever calling > >False. OpenFont() is not needed here. > >OpenDiskFont() will use the memory version if no better version exists on disk. > Interesting because I've noticed a loss of about 4K bytes occaisonally and this prompted me to run Dave Haynie's SETFONT a couple of times. Sure enough every time I do a SETFONT SIESTA 14 WINDOW I lose about 4K and flushing doesn't help. Here's the code fragment from Dave's c++ version: TextFont *font() { TextFont *f = OpenDiskFont(&sfattr); if (!f) f = OpenFont(&sfattr); if (!f) fail("Font \"%s\" not found\n",sfattr.ta_Name); return f; } This also raises the question, if I SETFONT in a CLI window and then endcli that window, is that font permanently in memory or did someone decrement the appropriate counter somewhere? Apparently not because I did this a couple of times and flushing didn't get rid of them. xoper shows me a bunch of copies sitting out there. I don't have c++ or I would fix this. Are you out there Dave? - steve mcafee