Page 1 of 2

Draw all spaces in a font

Posted: Mon Oct 11, 2010 4:09 pm
by hilnius
Hello,

Can somebody tell me how to draw all spaces in an irrlicht font, because after using

Code: Select all

setInvisibleCharacters(L"")
the spaces are still hidden...

Thanks
Hilnius

Posted: Tue Oct 12, 2010 2:44 am
by Iyad

Code: Select all

setInvisibleCharacters(L" ")
I dont think you put the space...

Posted: Tue Oct 12, 2010 2:43 pm
by hilnius
i want to show all spaces, not to hide them...

Posted: Tue Oct 12, 2010 3:01 pm
by greenya
hilnius,

what do you call "spaces" ?

Posted: Tue Oct 12, 2010 3:30 pm
by hilnius
" " is a space.. but in most fonts multiple spaces are hidden... i just want to show all spaces

Posted: Tue Oct 12, 2010 3:46 pm
by CuteAlien
I suppose the only way right now would be to replace the space-char in your font-texture with another bitmap.

Posted: Tue Oct 12, 2010 4:12 pm
by hilnius
it's not very clean... if you have a better solution for me...

Posted: Tue Oct 12, 2010 4:22 pm
by greenya
hilnius wrote:it's not very clean... if you have a better solution for me...
maybe just replace all spaces with some visible character like underline ("_") ?

Posted: Tue Oct 12, 2010 5:06 pm
by hilnius
if you were creating a game, in spite of spaces in the title would you put underscores "_" ?

Posted: Tue Oct 12, 2010 5:58 pm
by slavik262
I'm confused on what you're trying to do in the first place. Does Irrlicht only place one space between words, regardless of how many spaces are in the string?

Posted: Tue Oct 12, 2010 7:29 pm
by hilnius
yes
e.g: if you write

Code: Select all

"My       Game"
, Irrlicht writes

Code: Select all

"My Game"
by default

Posted: Tue Oct 12, 2010 8:04 pm
by greenya
Just checked, Irrlicht writes all spaces:
Image

Code: Select all

1) "Transparent Control:" // 1 space here
2) "Transparent      Control:" // 6 spaces here

Posted: Tue Oct 12, 2010 9:42 pm
by CuteAlien
Which font are you using? Irrlicht doesn't really care about spaces different from other characters usually. Do you maybe use some custom font rendering?

Posted: Wed Oct 13, 2010 2:53 am
by grumpymonkey
He might be confusing irrlicht with html...they are similar, you know

Posted: Wed Oct 13, 2010 3:36 am
by Luben
grumpymonkey wrote:He might be confusing irrlicht with html...they are similar, you know
i'n not sure, was that funny or helpful, or maybe neither? why make such a useless post? :?