Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Drazgal

Font loading/Font Engines

This topic is 6085 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!