i don't know what tools you're using i'm 
using CodeWarrior 6 and here's how i did it:

1.)     download xFONT 

2.)     go through and create a font and save it, etc. 
        this part's not too tough.  it will save as a
        *.pfn file.

3.)     downloaded the pilRC plugin for CodeWarrior from
        aron ardiri's website.  it takes a bit of navigation
        but you should find it.

4.)     install the plugin, pretty easy.

5.)     then, make sure the *.pfn file is in one of your 
        folders for you project.  i put it into my Rsc folder

6.)     create a *.rcp file and include the line:

        FONT 'FONT' FONTID 128 "*.pfn"

        where * is whatever name you want

7.)     cross your fingers and compile.  it will generate a 
        *.r file which will have a number like this:
        data 'NFNT' (20052) {...

8.)     now to use it:  i use it before a field like 
        this:

///////////////////////////////////////////////////////////////////////////
                        VoidHand        fontHandle;
                        FontPtr         font;
                        FieldPtr        pField;
                        int             nFieldIndex;
                        int             nLength;
                        
                        //  get a handle on the font resource, the number in
                        //  the second parameter is the number that is
generated
                        //  by the pilrc compiler, and it is located in the 
                        //  *.r file.  The number represents the ID of the
                        //  font
                        fontHandle = DmGetResource('NFNT', 20052 );
                        
                        //  lock the handle
                        font = MemHandleLock ( fontHandle );
                        
                        //  define our font, the first parameter
"fntAppFontCustomBase"
                        //  is the value 128 = 0x80, which represents the
number we chose
                        //  to define our font ID as; look in the *.rcp file
for 
                        //  the value 128; to locate "fntAppFontCustomBase"
look in the
                        //  Metrowerks Font.h header file
                        FntDefineFont ( fntAppFontCustomBase, font );
                        
                        //  unlock our handle after the font has been
defined
                        MemHandleUnlock ( fontHandle );


///////////////////////////////////////////////////////////////////////////

9.)     i think that's it if i didn't miss anything.
        if you don't have CodeWarrior, you can search the
        forum and find something related.  there's lots of stuff you just 
        have to piece the threads together like a puzzle.

bon chance!


        


-----Original Message-----
From: geeta more [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 17, 2001 7:23 AM
To: Palm Developer Forum
Subject: Create custom font


Hi, 
   can anybody explain me how to create custom font
and use it in your application? any example is there?
Thanx, in advance
Geeta

____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

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

-- 
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