Well, at last it seems that I've found it myself
I was wrong to call FntSetFont((FontID)MyFont) when the app starts.
Instead, I am to call it just before I want to output smth with this font.
It is unsufficient to call it in MainFormInit, but when I put it just before
WinDrawChars - everything's OK!
--
Best regards
Evgene Rokhlin,
Software Engineer.
mailto:[EMAIL PROTECTED]
http://www.ectaco.com
Evgeny Rokhlin <[EMAIL PROTECTED]> wrote in message
news:8494@palm-dev-forum...
>
> Hi, all
> I'm trying to add my font to the application. That's what I've done:
> added an .r file to the project with a line
> read 'Font' (0xBB8) "myfnt.PFT"; and made necessary changes to the
> project settings
> added the following code to the AppStart proc:
> #define MyFont 129
> VoidHand fontHandle;
> FontType *fontPtr;
> Err err;
> FontID prF;
>
> fontHandle=DmGetResource('Font',0xBB8);
> fontPtr=MemHandleLock(fontHandle);
> err=FntDefineFont((FontID)MyFont,fontPtr);
>
> prF=FntSetFont((FontID)MyFont);
> prF=FntGetFont();
>
> but with no result - the application still uses the standart font.
> I know for sure that fontPtr points to myfnt.PFT,
> err equals 0 after FntDefineFont so there's no error, and I've tried
MyFont
> as 128 and 129 with the same effect
>
> so what the possible problem can be?
>
> --
> Best regards
> Evgene Rokhlin,
> Software Engineer.
> mailto:[EMAIL PROTECTED]
> http://www.ectaco.com
>
>
>
>
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html