Fast Font Engines

Started by
3 comments, last by Zipster 24 years ago
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?
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
I load all the characters into sepereate offscreen surfaces, I find it faster - you only have to use one source rect [no lookups, etc].
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
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?

This topic is closed to new replies.

Advertisement