[comp.sys.amiga.tech] Loading a DiskFont

Bits_of_Magic@cup.portal.com (09/05/90)

I am successfully loading and using a disk font, but this product will
invariably end up on the machines of people with hard disks (like me)
and it seems unnecesarily complicated to ask someone to put a font for
a game into their Fonts directory on their hard disk.  Is there a way
to Assign a new fonts directory from within my program, then restore
the old Assign before I exit?  I am using Lattice C 5.04.

Nicky Robinson
<bits_of_magic@cup.portal.com>

lclausen@lckaos.UUCP (Lars R. Clausen) (09/08/90)

>In article <33534@cup.portal.com> Bits_of_Magic@cup.portal.com writes:
>I am successfully loading and using a disk font, but this product will
>invariably end up on the machines of people with hard disks (like me)
>and it seems unnecesarily complicated to ask someone to put a font for
>a game into their Fonts directory on their hard disk.  Is there a way
>to Assign a new fonts directory from within my program, then restore
>the old Assign before I exit?  I am using Lattice C 5.04.

Or even better, assign Fonts: to where you want it, load the font, then reassign
to the original Fonts:. We've run into exactly the same problem, and we don't
want Fonts: to be changed all the time, as other programs might want it.
Changing it only as long as it takes to load the font minimizes the risc of a
collision. I'd like to hear any suggestions, too.

--
+-----------------------------------------------------+---------------+
| Lars R. Clausen                (Fido: 2:230/22.34)  | Gnoshallasim- |
|  ..{pyramid|rutgers}!cbmvax!cbmehq!lckaos!lclausen  | bosh: The one |
| 8215693 Gnoshallasimbosh Gnome Mage 99 Ripe Old Age |<-that won in  |
| Claimer: Representing Sirius Cybernetics Coperation |     Moria!    |
+-----------------------------------------------------+---------------+

hclausen@adspdk.CBMNET (Henrik Clausen) (09/13/90)

>In article <lclausen.0335@lckaos.UUCP> lclausen@lckaos.UUCP (Lars R. Clausen) writes:
>>In article <33534@cup.portal.com> Bits_of_Magic@cup.portal.com writes:

>>Is there a way
>>to Assign a new fonts directory from within my program, then restore
>>the old Assign before I exit?  I am using Lattice C 5.04.

>Or even better, assign Fonts: to where you want it, load the font, then reassign
>to the original Fonts:. We've run into exactly the same problem, and we don't
>want Fonts: to be changed all the time, as other programs might want it.
>Changing it only as long as it takes to load the font minimizes the risc of a
>collision. I'd like to hear any suggestions, too.

   Best: 

   USING FONTS IN OTHER DIRECTORIES

OpenDiskFont() has a feature which makes it easy to access fonts in directories
other than FONTS:. If the name in the TextAttr structure (shich gets passed to
OpenDiskFont()) is a full pathname, (e.g. Work:special/accounting.font.font or
df0:Phunny/Phonts/quack.fonts), then OpenDiskFont() will use that full pathname
to access the font contents file.

   (Quote without permission from RKM: Libraries & Devices)

   This way, you will not mess with the global font assign, and you can still
look anywhere you want for your fonts, like MyProg:Fonts/... or whatever.
 
                                                 -Henrik

--
|            Henrik Clausen, Graffiti Data (Fido: 2:230/22.33)           |
|           ...{pyramid|rutgers}!cbmvax!cbmehq!adspdk!hclausen           |
\__"Do not accept the heart that is the slave to reason" - Qawwali trad__/