Font engine

Started by
1 comment, last by Lord Maz 22 years, 8 months ago
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?
-Lord Maz-
Advertisement
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.
Hmm.. stupid of me not to think of that Thanks, I''ll try it!
-Lord Maz-

This topic is closed to new replies.

Advertisement