🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.ms.programmer
Article #2009

Re: Font Resource saga ....

#2009
From: Peter Ruczynski
Date: Tue, 09 Apr 1991 11:04
40 lines
2587 bytes
In article <1991Apr9.100804.26613@qut.edu.au> drift@qut.edu.au (Glenn Wallace) writes:
>A while back there was talk about font resources.
[...]
>2) I thought ... stuff it, I'll put my fonts in my DLL, as they are reasonably
>   private to what my DLL is doing. So I do a AddFontResource in my LibMain
>   to make them available after load time as follows;
>
>   nf = AddFontResource(MAKEINTRESOURCE(hInstance));   // something like that..
>
>   and I still get a BIG FAT 0 from AddFontResource.
[...]
>   Anyone got any clues with AddFontResource????

Well this works for me, I can only imagine that you are not using the
correct linker (I'm using the one that comes with C6.00) or have a
bugette in your .def or .rc file somewhere (make sure you have read the
readme.WRI file that comes with the SDK).  I had no joy, though, when I
tried to rc the font into my .exe, perhaps AddFontResource doesn't like
fonts in the code that it is currently executing?!?!  The other thing I do is
that I have the file in the same directory as the .exe and the dll
really has nothing else in it, although I don't see why either of these
should make any difference.

If you're still really stuck mail me and I'll see if I can knock together
some source you could use and mail it to you (however, I hope you're not
in a hurry, I'm fairly busy at the moment).

>Help! Summary of mailed replies will be posted.

As for compiling up a .fon file... ZERO I'm afraid.
There are a few of us pursuing this at the moment, perhaps we should start
up a comp.microsoft.windows.programmer.font.problems mailing list ;-)
(just joking!!) I dare say there will be a spate of postings if we find or
hear anything moing.

--
      -w---------    Pyramid Technology U.K.       Peter Ruczynski    
    ---www-------    Pyramid House                 #include <std/disclaimer.h>
  -----wwwww-----    Farnborough                   pjr@pyra.co.uk
-------wwwwwww---    Hants GU14 7PL     England.   Wot no funny comment :-)
Technical Details
Message-ID: <671195091.AA19152@flaccid>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!pyrltd!pyra.co.uk!pjr
References: <1991Apr9.100804.26613@qut.edu.au>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!spool.mu.edu!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!pyrltd!pyra.co.uk!pjr
From: pjr@pyra.co.uk (Peter Ruczynski)
Newsgroups: comp.windows.ms.programmer
Subject: Re: Font Resource saga ....
Message-ID: <671195091.AA19152@flaccid>
Date: 9 Apr 91 11:04:52 GMT
References: <1991Apr9.100804.26613@qut.edu.au>
Sender: news@pyra.co.uk (News system)
Reply-To: pjr@pyra.co.uk (Peter Ruczynski)
Organization: Pyramid Technology Ltd, Farnborough, ENGLAND
Lines: 40