Article View: comp.sys.amiga.tech
Article #12264Re: Fonts in MEMF_PUBLIC
From: Randell Jesup
Date: Thu, 20 Apr 1989 22:53
Date: Thu, 20 Apr 1989 22:53
25 lines
1932 bytes
1932 bytes
In article <4053@tekig5.PEN.TEK.COM> wayneck@tekig5.PEN.TEK.COM (Wayne Knapp) writes:
>> In article <4039@tekig5.PEN.TEK.COM> wayneck@tekig5.PEN.TEK.COM (Wayne Knapp) writes:
>; >I'm looking for two pieces of code that may all ready exist.
>; > 1. Routines that run fonts out of MEMF_PUBLIC instead of
>; > MEMF_CHIP. I would be delighted with just the code
>; > to load a font.
...
>Anyway I don't need the blitter support for the text in my
>program, but I do need all the chip RAM I can get. The
>fonts are stinging me two ways. One they hog up globs of
>chip RAM, and two since they hang around after closing until
>forced out, they tend to fragment my chip memory since I do
>a lot of allocation/deallocation.
Easy: Fonts are LoadSeg()ed into memory. Therefor, they have bits
in the hunk types specifying memory type (normally set to CHIP). Make copies
of the font files, and run through the file clearing the CHIP bit, which means
it will go into fast memory by default, and chip if no fast is available.
Note that you DON'T want to use these fonts from other programs, so you may
want to move them to some directory other than fonts:, and use LoadSeg on them
directly (LoadSeg returns a BPTR to the first hunk, hunks are a BPTR to next
hunk followed by data (and length of data at hunk-4)).
--
Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup
Technical Details
Message-ID:
<6656@cbmvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!apple!oliveb!amiga!cbmvax!jesupReferences:
<4039@tekig5.PEN.TEK.COM> <5336@cs.Buffalo.EDU> <4053@tekig5.PEN.TEK.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!rutgers!apple!oliveb!amiga!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga.tech Subject: Re: Fonts in MEMF_PUBLIC Keywords: not MEMF_CHIP Message-ID: <6656@cbmvax.UUCP> Date: 20 Apr 89 22:53:55 GMT References: <4039@tekig5.PEN.TEK.COM> <5336@cs.Buffalo.EDU> <4053@tekig5.PEN.TEK.COM> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 25