Thursday, January 17, 2008

Black Font White Font Black Font White Font

So.............
One major thing I have learned today is that windows renders (draws) fonts totally differently depending if you render white on to black or black on to white. You might think that its just a matter of inverting the colours, but NO! it does it totally differently.
I've always done dark moody serious depressing games, so I've tended to use light colour text on dark moody backgrounds.
Then I did Kudos, which was a bit upbeat. But in typical cliff style, I used miserable black backgrounds and carried on as before.
But Now I'm experimenting with lighter GUI with dark text and it looked BAD. I tried all sorts of fixes until some kind genius pointed out that if my font drawing code took as its source windows rendering of white on black and swapped it, I'd get poor results.

My text engine basically uses a bitmap cut into chunks and tints the colour to my liking. But now... if I want black text I need to use a different source bitmap to if I wanted to use white text. It's no big disaster, as I'm likely now to only use black text, but it was well worth discovering.

Links to this post:

Create a Link

<< Home