LoadImageFont
BlitzMax Forums/BlitzMax Beginners Area/LoadImageFont
| ||
Although not clear in the documentation I'm assuming this will load a system or True Type font for use with DrawText. How do I specify the font URL on Mac OS X? Thanks, Jim |
| ||
Disregard the question. I've figured it out. Thanks, Jim |
| ||
write your answer :-) i don't know what to do with this... |
| ||
I took the easy path with this one and just dropped my True Type fonts in my game folder and don't need to specify the path in LoadImageFont. I guess it defaults to the application's folder. I do have a followup question through. The fonts don't seem to render very nicely in my game. I'm using them at 10 - 18 point and they seem to have the jaggies. Not knowing much about BMax drawing I'm wondering if BMax doesn't use the OS X ( or Windows ) fond rendering and is somehow converting them and drawing them in Open GL. Regards, Jim |
| ||
Does the Scale command apply to fonts as well? If so, you may be able to set them at a larger fonts size, and use the Scale command to apply an smoothing effect? |
| ||
Interesting thought. Scale does apply to DrawText. I'll give it a try. |
| ||
bbmax convert fonts to images and draw this. |
| ||
also, I noticed that there is another parameter to the LoadFont command: style=smoothfont May want to experiment with that one as well, the manual doesn't seem to mention anything about what it does... Not sure if if applies some smoothing at the default size, or if it's juse an alias for the 'filteredimage' style, which results in the image being smoothed when images are scaled or rotated. |
| ||
it think, this is filteredimage... i tryed to disable it, but i see no effect... |
| ||
z80jim could you post some code? Because I can't seem to reload my fonts - possible bug. |
| ||
Its a bug or hidden feature! ;) |
| ||
DrawText is affected by the blend mode so my guess is you haven't done a SetBlend ALPHABLEND before drawinng your text, hence no antialiasing. |
| ||
Steve, There really is no code to post. At program startup I do this: LoadImageFont( "GillSans.dfont", 14 ) The font file is in my application directory which appears to be the default location for finding it. Then: SetScale( 1.0, 1.0 ) Later I just drawText. |
| ||
Yep it's a bug in BlitzMax - apparently it'll be fixed next week. See here: http://www.blitzbasic.com/Community/posts.php?topic=44591 |