Font loading/Font Engines
I''ve reached the stage in my engine where I need to start work on fonts. I could just make a tileset holding characters on a bitmap and use that however I was wondering how easy it is to load fonts manually (not using the windows GDI functions as they are generally too slow). Could anyone point me towards infomation on the ttf font format or should I just stick with loading in bitmaps?
What graphics lib are you using? The DX8 SDK comes with a smurfy font class, that doesn''t use GDI for drawing the font( the class name is CD3DFont ). The font gets loaded(blt''d) to a surface, for later use.
If you opt for bitmaps, make each ''tile'' a power of 2, so you can take advantage of shift operators when building up the output( shifts are less expensive than multiplication or division ).
Using GDI to load a font is acceptable. However, try to avoid switching to GDI during rendering.
"It''s only after you''ve lost everything that you''re free to do anything." Tyler Durden
If you opt for bitmaps, make each ''tile'' a power of 2, so you can take advantage of shift operators when building up the output( shifts are less expensive than multiplication or division ).
Using GDI to load a font is acceptable. However, try to avoid switching to GDI during rendering.
"It''s only after you''ve lost everything that you''re free to do anything." Tyler Durden
I just recently designed a textual handling module for my graphical wrapper (DX7). If you want I can send you the source or help you out with whatever you need. It''s done, but I haven''t had the chance to debug it or test it since school started. Either reply here or email me at OneHotCoconut@cs.com. It uses the method of loading the text images into bitmaps.
-Brent Robinson
-Brent Robinson
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement