News:

PlayBASIC2DLL V0.99 Revision I Commercial Edition released! - Convert PlayBASIC programs to super fast Machine Code. 

Main Menu

LoadFont() question

Started by thefrog, December 12, 2007, 10:57:55 AM

Previous topic - Next topic

thefrog

Hello,

Quick question.

It seems Loadfont function searches for the font in the windows system font directory.
Is there a way of telling it to look in the current directory or somewhere else for it?

The problem is when deploying the game on the user's machine, if we use a custom font, we have to copy it to his windows font directory. Wich is a bit envasive...

Thanks

kevin

 LoadFont wraps the windows font interface.  In other words it works however they decided it should work.   Most functions will search locally for a resource though, so LoadFont may do this also.    However,  If you're going to ship a custom windows font with your game, then the installer needs to copy this resource into the appropriate location.   While you could copy the file from with your app,  windows security will no doubt get in the way these days.     

thefrog

Ok thanks

the best solution is then to transform all the letters in Bitmap on one bitmap file and capture each letter.

kevin

#3
 Update:

Only if you're already converting it to an internal bitmap font already,  then the best method for PlayBASIC V1.64 revisions, would be save the font out in CRT format (SaveFont) or via  using PlayFONT.  No need to worry about what Type Type fonts the end user has then.