Reputation:
I had a look at the Font class in DirectX Documentation and looked at this/these question/answers but they didn't satisdy my need.
I tried searching for "C++ DirectX 9 Font library" yet this didn't yield any useful results.
Are there any DX9 Font libraries available that, for example, can load TTF fonts (eg Arial) and then draw them on the screen?
The current class I am using does satisfy most of my needs but is buggy as hell :( (in terms of, when I alt tab a third party application in which I draw information, it crashes and it's somehow not in my DLL).
Upvotes: 0
Views: 2587
Reputation: 13003
It's time to write your own bitmap font renderer! You will need:
Step-by-step:
Well, for a first time you can start from someting like: take character's bitmap from FreeType and draw it directly, but I think that performance will be very low.
Update: Hard to write a small example on such a topic, but:
BitmapCharacterSet
in his code is atlas. Upvotes: 1
Reputation: 3970
You may want to have a look at BMFont ( http://www.angelcode.com/products/bmfont/ ) which converts TTF fonts to bitmaps. They can then be rendered with this code: http://www.angelcode.com/dev/bmfonts/
It's not a ready-to-use library though.
Upvotes: 0