Article View: comp.sys.amiga.tech
Article #7927Re: Opening a diskfont??
From: Jean-Michel Forgeas
Date: Mon, 07 Jan 1991 10:55
Date: Mon, 07 Jan 1991 10:55
38 lines
1803 bytes
1803 bytes
In article <faheyr.663140235@silver>, 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....
Here is the routine I'm using. It looks in ram before the disk.
It is necessary to verify tf_YSize because if a font is found
in ram with a different size, OpenFont() will success.
Before using this you have to fill the TextAttr structure.
struct TextFont *LoadThisFont( struct TextAttr *TextAttr )
{
struct TextFont *font;
if ((font = (struct TextFont *) OpenFont( TextAttr ))
&& Font->tf_YSize != TextAttr->ta_YSize)
{
CloseFont( font );
font = 0;
}
if (! font)
{
TextAttr->ta_Flags = FPF_DISKFONT;
font = (struct TextFont *) OpenDiskFont( TextAttr );
}
return( font );
}
Hope this help.
--
\___/
Jean-Michel Forgeas \-/
cbmvax!cbmehq!cbmfra!swinjm!forgeas | The Software Winery
-^-
And, where is the universe ?
Technical Details
Message-ID:
<187c1496.ARN0b44@swinjm.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!cbmehq!cbmfra!swinjm!forgeasReferences:
<faheyr.663140235@silver>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!cbmvax!cbmehq!cbmfra!swinjm!forgeas From: forgeas@swinjm.UUCP (Jean-Michel Forgeas) Newsgroups: comp.sys.amiga.tech Subject: Re: Opening a diskfont?? Message-ID: <187c1496.ARN0b44@swinjm.UUCP> Date: 7 Jan 91 10:55:18 GMT References: <faheyr.663140235@silver> Reply-To: forgeas@swinjm.UUCP (Jean-Michel Forgeas) Followup-To: comp.sys.amiga.tech Organization: The Software Winery Lines: 38