Article View: comp.sys.amiga.tech
Article #7872Re: Opening a diskfont??
From: Brian Jackson
Date: Sun, 06 Jan 1991 14:20
Date: Sun, 06 Jan 1991 14:20
37 lines
2068 bytes
2068 bytes
In article <faheyr.663140235@silver> faheyr@silver.ucs.indiana.edu (Bob Fahey <NECR0SIS>) writes:
>I am programming a utility in C (lattice), and need to open a specific
>font off of a disk. (the font is already stored in the fonts: dir of
>my boot disk).
>
>How do you go about opening that disk-based font? I have tried and tried,
>but seem to only be able to open the rombased fonts....
>What exactly needs to be opened before you can call OpenFont()? Every
>time I have tried doing this, either the computer guru's, or it just
>simply does not open the font....
First you have to open the diskfont library:
DiskfontBase = (struct DiskfontBase *)OpenLibrary("diskfont.library",0L);
Then you have to open the font itself using an initialized TextAttr
structure:
struct TextFont *tf ;
tf = (struct TextFont *)OpenDiskFont((struct TextAttr *)myfontattr);
^^^^
There is actually a bit more to it than this (since the font might
already be in memory) but this is the general idea :) Don't forget
to close the font again before you exit:
CloseFont( tf );
bj
>Bob
-----------------------------------------------------------------------
| Brian Jackson Software Engineer, Commodore-Amiga Inc. GEnie: B.J. |
| bj@cbmvax.cbm.commodore.com or ...{uunet|rutgers}!cbmvax!bj |
| 'Please dosconnect in your mind the concepts 'seems to work just |
| fine' and 'Is allowed' - Peter Cherna |
-----------------------------------------------------------------------
Technical Details
Message-ID:
<17137@cbmvax.commodore.com>Path:
arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!wuarchive!uunet!cbmvax!bjReferences:
<faheyr.663140235@silver>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!wuarchive!uunet!cbmvax!bj From: bj@cbmvax.commodore.com (Brian Jackson) Newsgroups: comp.sys.amiga.tech Subject: Re: Opening a diskfont?? Message-ID: <17137@cbmvax.commodore.com> Date: 6 Jan 91 14:20:22 GMT References: <faheyr.663140235@silver> Reply-To: bj@cbmvax.commodore.com (Brian Jackson) Organization: Commodore, West Chester, PA Lines: 37