> This subject comes up again and again.
>
> Is is posable to do it without needing Hackmaster?  What about with
> Codewarrior and Constructor?  I am aware of the Fnt functions and
> FntDefineFont in particular but how do I define a custom font resource, can
> can i use Constructor to build it?  Are ther font editors that can do this?
> If so where?
>
Create a resource �NFNT� (2000). You can specify a font textually using
PilRC (or the PilRC plugin for CodeWarrior--see
http://www.calliopeinc.com/devcorner.htm).  Here's a short example:

Resources.rcp:
FONT ID 2000 FONTID 128 "Font.txt"

Font.txt:
// A 5x11 fixed width font
fontType 36864
ascent 9
descent 2
leading 2
GLYPH '('
-----
-----
---#-
--#--
-#---
-#---
-#---
-#---
--#--
---#-
-----
GLYPH ')'
-----
-----
#----
-#---
--#--
--#--
--#--
--#--
-#---
#----
-----

In your code, do the following:
In AppStart:

h = DmGetResource('NFNT', 2000);
gFontPtr = MemHandleLock(h)
FntDefineFont(128, gFontPtr);

In AppStop:
MemPtrUnlock(gFontPtr);
DmReleaseResource(MemPtrRecoverHandle
  (gFontPtr));

And then use font number 128, as you wish.

Neil

--
Neil Rhodes
Calliope Enterprises, Inc.
1328 Clock Avenue
Redlands, CA  92374
(909) 793-5995     [EMAIL PROTECTED]      fax: (909) 793-2545

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to