maxhamner
Squire
USA
26 Posts |
Posted - Nov 11 2004 : 08:20:27 AM
|
Here is the font I use to load fonts for my apps without installing them. Not very special, but handy. I use this instead of making bitmaps of fonts so I can draw text in any size/color in my programs, and even do 'drop shadows' by drawing the font twice (black with offset, normal without offset), and other effects.
The nice part is that DX7 can use them once they (fonts) are added. The calcwidth, calcheight functions make it easy to mange where you will draw the text to center it, handle wrapping etc.
If you have a 'box" where you draw messages you can use "calctextwidth" on each word, and if it doesn't go outside the box use the Directdraw function "drawtext" with the last parameter set to true to append the last draw... makes for a super easy word wrap that works in ANY font/size.
Download Attachment: Font.bas 13.31 KB |
-- max There are 10 kinds of people in the world, those that understand binary and those that don't. |
|