Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uwm.edu!uakari.primate.wisc.edu!brutus.cs.uiuc.edu!apple!oliveb!amiga!kodiak From: kodiak@amiga.UUCP (Robert R. Burns) Newsgroups: comp.sys.amiga.tech Subject: Re: Fonts and freeing memory Message-ID: <5125@amiga.UUCP> Date: 16 Jan 90 18:43:37 GMT References: <2528@jato.Jpl.Nasa.Gov> <145@ccave.UUCP> Reply-To: kodiak@batgirl.UUCP (Robert R. Burns) Organization: Commodore-Amiga Inc, Los Gatos CA Lines: 23 In article <145@ccave.UUCP> root@ccave.UUCP (Juergen Hermann) writes: )You MUST use OpenFont() to look for resident fonts before ever calling )OpenDiskFont(). If not, the font is made resident over and over again, in )fact loosing memory for nothing. False. OpenFont() is not needed here. OpenDiskFont() will use the memory version if no better version exists on disk. For 1.3 & earlier, this means the disk is hit every time looking for that "better match". This disk hit may be what confused you. For 1.4, if the match in memory is already as good as it can get, the disk won't be hit. To prepare for that, ensure that the ta_Style and ta_Flags you set in the TextAttr are those from the AvailFonts result: not just the ta_Name and ta_YSize. - Kodiak -- Bob Burns, amiga!kodiak _ | /_ _|. _ | Commodore __ |_) _ |_ _ )' |<(_)(_)|(_\|< /\ | ||| _` /\ |_)(_\| )(_\ | | \ Software ___/..\|\/|||__|/..\___ Faith