The DREADED Font Engine

Started by
1 comment, last by circlesoft 18 years, 7 months ago
Hiya Guys... I'm in the process of writing a DirectX application that will make heavy use of a GUI. I have some ideas about how to implement a FAST font engine to use in the GUI. I.e. one that does NOT involve the SLOW Windows 'TextOut' GDI funtion. But before I begin, I wish to know if this would be the BEST way to implement a high specs font engine. Basically, I was thinking about using a font bitmap and blitting those fonts to the back surface buffer as needed. Simple to do but a bit fiddly to implement... But if this is the industry standard, then so be it! I'd just like to know if theres an even BETTER way of going about this. Any help would be MUCH appreciated... THX!!!
Advertisement
The Direct X font tutorials are a good place to start. I've been working on a GUI system on/off myself. To allow for easy user defined fonts, I currently import a texture with the individual letters and an XML file that details where the different characters are. I use a modified version of MudFont to generate the textures and the XML.

I found mudfont on flipcode. The link below still seems to work.
http://www.flipcode.com/cgi-bin/fcarticles.cgi?show=64161

I'm thinking about taking some time of my normal project to begin a framework for a GUI system that I may later open source. I'd like something that could possible make the GUI with XML and have a "what you see is what you get" editor, but that's a long way a way. I have a full time job on top of this, so we'll see how it goes.
Why not just use ID3DXFont? It will seriously take you about 5 minutes to integrate into your application. It's very fast too. Plus, you can pick any font that you want at runtime (since it uses the native Windows TTF functionality), so you don't have to make any bitmaps.
Dustin Franklin ( circlesoft :: KBase :: Mystic GD :: ApolloNL )

This topic is closed to new replies.

Advertisement