BlitzMax Fonts

BlitzMax Forums/BlitzMax Beginners Area/BlitzMax Fonts

Tachyon(Posted 2005) [#1]
Hey all- long time reader, first time poster.

I just wanted to make sure I am doing this right. When I bring a TTF (simple Arial, for example) into BMax using LoadImageFont/SetImageFont, it looks terrible. It's jagged and ill-formed, and I need to enlarge it past 18-20 points before it looks somewhat decent, and then of course it's too large to use for my intended purpose.

What do other people do to get nice-looking fonts in their progs? Am I missing a feature in BMax that fixes this?


Booticus(Posted 2005) [#2]
Hey Tachyon! Whats the font you're using? Can I give it a try over here? Email it to me and your code, I'll have a look at it, see if it looks bad like you describe and get back to you! :)


Rimmsy(Posted 2005) [#3]
I've noticed with ttf fonts that only when you setAlpha 1.0 does it look alright. Anything below that and it starts to blend horribly with the background. And don't even touch the scale! I'll run some test programs see what I get...

Have a look at this example: www.3030deathwar.co.uk/downloads/fontexample.zip

I think it's largely based on the original ttf font file. But there is some noticable blurring at any scale.


Stuart Morgan(Posted 2005) [#4]
What do other people do to get nice-looking fonts in their progs? Am I missing a feature in BMax that fixes this?

You should set the blendmode to ALPHABLEND before drawing text for non jagged antialiased text.

SetBlend ALPHABLEND
DrawText "Non jagged text...",MouseX(),MouseY()

I dont like this as it tends to blur the text occasionally.


Tachyon(Posted 2005) [#5]
Rims-

Your code made the fonts look good again. It looks like my blendmode was incorrent!

Thanks also Booticus and Stuart for your quick replies- this forum rocks!

Signed,
Another satisfied customer


Booticus(Posted 2005) [#6]
Heh. I didnt do nothin'! Its all Stuart and Rims! ;)