Jump to content
  • Advertisement

Archived

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

Zipster

Fast Font Engines

This topic is 6762 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

Im using GDI''s font stuff for my little demos, but I read that for a real-time game, you MUST create your own font engine instead of using GDI''s due to speed. Any suggestions on how to start?

Share this post


Link to post
Share on other sites
Advertisement
that is absolutely true. when i switched from GDI to my own font drawing, i got a speed increase of 300%, and i was only using GDI to display the framerate!

my font engine is pretty simple. i have one offscreen surface that contains all characters, and i have an array with the information where in the bitmap a letter is.
then i just draw the chars one after another

Share this post


Link to post
Share on other sites
I load all the characters into sepereate offscreen surfaces, I find it faster - you only have to use one source rect [no lookups, etc].

Share this post


Link to post
Share on other sites
wouldn''t that introduce a lot of unnecessary overhead? having separate surfaces, that is. i''m guessing that there''s a lot more information per surface than per RECT. that''s just my opinion, don''t feel obligated to act upon it. however implemented, it definitely is faster than GDI.

cheers,

crazy166
some people think i'm crazy, some people know it

Share this post


Link to post
Share on other sites
Great, thx for all the info, but theres still something else i need to know...
Do i have to draw each character in a paint program and save them into a bmp template file or something, or is there a GDI function that allows me to load a certain font style to a surface or what?

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!