Jump to content
  • Advertisement


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

Lord Maz

Font engine

This topic is 6187 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''m trying to make a not too advanced but working font engine that I can use it my games later on, it currently loads a bmp with all the characters and scans for the size and so on automaticly, I only need to write what it should say and where to put it.. but it can only use simple characters, A-Z, a-z, 0-9.. I''m not sure how I should do if I want to add characters such as ".", "," and the famous swedish "Å", "Ä" and "Ö":s to it without too much change.. VC++ won''t let me write dots and stuff in the character strings.. any font engine gurus in this forum who wants to share their unlimited knowledge?

Share this post

Link to post
Share on other sites
In the font engine I wrote, I used an array of RECT''s for the letters. The letters had to be in the same order on the bitmap, but not necessarily the same size. This way, if I ever wanted to add an extra character to the font, all I would have to do is make the array bigger.
If you want a way to represent swedish letters in a string, you can pick a character, ie: "|" (don''t use "\" !!!). Then when you are parsing the string to draw it on the screen, you can get your routine to read one letter further if it comes up to the character you chose as your special character. Then the characters that come after the symbol you chose would determine what special character the string wants. This system is the same as the c++ "escape sequences".
I am not sure if this is the kind of answer you were looking for or not. If you want my help any more, reply or e-mail me.

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!