[comp.windows.ms.programmer] .FNT -> .FON

nagamati@aludra.usc.edu (Romklau Nagamati) (04/17/91)

Hi Netlanders,

I'm wondering whether anyone have play around with .FON file??? I'm trying
to create a .FON file by using SDK Fonteditor to create a .FNT file. Then,
create a dummy stub in assembly, link, and RC.

I'm doing exactly what is in Chapter 18 of the SDK Guide to Programming, but
I got the message "LINK error: L2049 no segments defined" when linking. I guess
the problem is with the dummy stub.  Here is the dummy stub I use.

                    .xlist
                    include cmacroc.inc
                    .list

      sBegin        CODE
      sEnd          CODE
                    end

Note that this dummy stub is exactly what is listed in that book. Am I
missing someting here? I try to get around by using a standard assembly things
, but got a complaint from the RC saying it's not windows EXE.

Are there any way else I can create a dummy stub? (assembly or C is fine)
Can anyone shade me some light? 
                    
Thanks
Ron
  
===============================================================================
Mr. Romklau (Ron) Nagamati           | Opinion expressed here is solely mine,
nagamati@usc.edu                     | but I can't be held liable for it.
CompuServe: 71170,3166               | I'll take credits, if any.
===============================================================================

mmshah@athena.mit.edu (Milan M Shah) (04/17/91)

In article <16640@chaph.usc.edu> nagamati@aludra.usc.edu (Romklau Nagamati) writes:
>Hi Netlanders,
>
>I'm wondering whether anyone have play around with .FON file??? I'm trying
>to create a .FON file by using SDK Fonteditor to create a .FNT file. Then,
>create a dummy stub in assembly, link, and RC.
>
>I'm doing exactly what is in Chapter 18 of the SDK Guide to Programming, but
>I got the message "LINK error: L2049 no segments defined" when linking. 

Nothing personal, but, Oh god, here we go again. How does one put this in the
FAQ?

The above LINK error is a bug in link. The fix is to run exehdr /r on the
.exe file, and then run rc on it. The explanation I have is that link 
incorrectly detects an error, and marks the resulting .exe file with some kind
of error bit, even though the rest of the exe file is ok. Exehdr /r will
reset this "error bit", after which rc will work just fine.

Alternate fix is to use link4 from SDK 2.10

Milan
.

pjr@pyra.co.uk (Peter Ruczynski) (04/18/91)

In article <1991Apr17.140221.9285@athena.mit.edu> mmshah@athena.mit.edu (Milan M Shah) writes:
>In article <16640@chaph.usc.edu> nagamati@aludra.usc.edu (Romklau Nagamati) writes:
>>Hi Netlanders,
>>
>>I'm wondering whether anyone have play around with .FON file??? I'm trying
>>to create a .FON file by using SDK Fonteditor to create a .FNT file. Then,
>>create a dummy stub in assembly, link, and RC.
>>
>>I'm doing exactly what is in Chapter 18 of the SDK Guide to Programming, but
>>I got the message "LINK error: L2049 no segments defined" when linking. 

Yeah, I had the same problem!

>Nothing personal, but, Oh god, here we go again. How does one put this in the
>FAQ?

FLAME ON
There is no need for this.  Most people don't have time to read news,
so questions do get repeated.  It's a fact of life!

As you say, perhaps this is one that needs to be put into the
'Frequently asked questions' category.
(Do we have a Frequently asked questions monthly posting? I must say I haven't
seen one)
FLAME OFF

>The above LINK error is a bug in link. The fix is to run exehdr /r on the
>.exe file, and then run rc on it. The explanation I have is that link 
>incorrectly detects an error, and marks the resulting .exe file with some kind
>of error bit, even though the rest of the exe file is ok. Exehdr /r will
>reset this "error bit", after which rc will work just fine.

Yes, but the fontmanager still does not recognise the .fon file as a valid
.fon file.

The only current (known) solution is to build a dll and use AddFontResource()
with the name of your dll. (Unless, of course, someone from Microsoft would
care to enlighten a few very frustrated programmers :-)

>Milan

Pete.
--
      -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 :-)