Problem using text

I’m readint the NeHe tutorial number 17 (2D Texture Font), the problem is, how I draw texts using chars like “Ç”, “ã” and others???
I have the picture with ASCII char, but the changes didn’t work, he didn’t draw the char…

Thx

[This message has been edited by alex_r (edited 09-08-2002).]

Because the Nehe demo uses a bit map with only the English set of charactors.
Once you learn how he put’s the charactors on the screen, it will be easy for you to add other’s that are used in other languages.

Originally posted by alex_r:
[b]I’m readint the NeHe tutorial number 17 (2D Texture Font), the problem is, how I draw texts using chars like “Ç”, “ã” and others???
I have the picture with ASCII char, but the changes didn’t work, he didn’t draw the char…

Thx

[This message has been edited by alex_r (edited 09-08-2002).][/b]

[This message has been edited by nexusone (edited 09-09-2002).]

I know how, I changed the number of chars, but he ignore these chars… Anyone know were is the problem or know any sample???

Thx again
Alexandre Ribeiro de Sá

I don’t think you understand the nehe tutor.
There is no problem with his code, it does what he intended it to do. Take letters drawn on a bitmap and use them to create textured based text.

He draws the charactors to a bitmap image file with all of the letters he wants to use.
Since he is using only English, he only includes numbers and letters needed.

Just create a image file in a paint program with all the charactors you want use.
Then adjust his code to use your charactors set.

Originally posted by alex_r:
[b]I know how, I changed the number of chars, but he ignore these chars… Anyone know were is the problem or know any sample???

Thx again
Alexandre Ribeiro de Sá[/b]

No, Nehe use a bimap with two fonts, in this bitmap, I can’t use these letters, them I try to use one font in bitmap.
It’s not just change the picture…

If you had read his tutor/code, ASCII charactors start at 32, 32 = " " being a space. Anything before 32 is control charactors.

On his bitmap the space is the first charactor.

You will have to manualy convert the ASCII charactor number to one the translates to the position on the BMP file.
If you count the charactors on the bitmap, you find your charactors start at 97.

“Ç” = 97 = ASCII value is 128
“ã” = 100 = ASCII value is 134// could be wrong on this one…

// but add this line check for extended charactor.
if (string[i] > 127 ) string[i] = string[i] -31; // should do the trick. If not adjust + or - 1.

Does this help, any…

Originally posted by alex_r:
No, Nehe use a bimap with two fonts, in this bitmap, I can’t use these letters, them I try to use one font in bitmap.
It’s not just change the picture…

[This message has been edited by nexusone (edited 09-10-2002).]

In the program (The NeHe original code), the “Ç” is -57…
And in your line, the error is “Can’t convert char * into a int”…

I found the problem!!!
I changed the chars position on the picture.

Thanks for all
Alexandre Ribeiro de Sá

Originally posted by nexusone:
[b]Because the Nehe demo uses a bit map with only the English set of charactors.
Once you learn how he put’s the charactors on the screen, it will be easy for you to add other’s that are used in other languages.

[This message has been edited by nexusone (edited 09-09-2002).][/b]

Where cn I find this Nehe demo for fonts?

Originally posted by Hurle:
Where cn I find this Nehe demo for fonts?

Cancel that question. I found it at http://nehe.gamedev.net/tutorials/lesson.asp?l=17
Thanks, Hurle