Draw all spaces in a font

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
hilnius
Posts: 33
Joined: Tue Jun 29, 2010 9:55 pm

Draw all spaces in a font

Post 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
Iyad
Posts: 140
Joined: Sat Mar 07, 2009 1:18 am
Location: Montreal, Canada

Post by Iyad »

Code: Select all

setInvisibleCharacters(L" ")
I dont think you put the space...
#include <Iyad.h>
hilnius
Posts: 33
Joined: Tue Jun 29, 2010 9:55 pm

Post by hilnius »

i want to show all spaces, not to hide them...
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

hilnius,

what do you call "spaces" ?
hilnius
Posts: 33
Joined: Tue Jun 29, 2010 9:55 pm

Post by hilnius »

" " is a space.. but in most fonts multiple spaces are hidden... i just want to show all spaces
CuteAlien
Admin
Posts: 9689
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

I suppose the only way right now would be to replace the space-char in your font-texture with another bitmap.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
hilnius
Posts: 33
Joined: Tue Jun 29, 2010 9:55 pm

Post by hilnius »

it's not very clean... if you have a better solution for me...
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post 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 ("_") ?
hilnius
Posts: 33
Joined: Tue Jun 29, 2010 9:55 pm

Post by hilnius »

if you were creating a game, in spite of spaces in the title would you put underscores "_" ?
slavik262
Posts: 753
Joined: Sun Nov 22, 2009 9:25 pm
Location: Wisconsin, USA

Post 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?
hilnius
Posts: 33
Joined: Tue Jun 29, 2010 9:55 pm

Post by hilnius »

yes
e.g: if you write

Code: Select all

"My       Game"
, Irrlicht writes

Code: Select all

"My Game"
by default
greenya
Posts: 1012
Joined: Sun Jan 21, 2007 1:46 pm
Location: Ukraine
Contact:

Post by greenya »

Just checked, Irrlicht writes all spaces:
Image

Code: Select all

1) "Transparent Control:" // 1 space here
2) "Transparent      Control:" // 6 spaces here
CuteAlien
Admin
Posts: 9689
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post 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?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
grumpymonkey
Posts: 222
Joined: Mon Jan 19, 2009 10:03 pm
Location: Miami, Florida
Contact:

Post by grumpymonkey »

He might be confusing irrlicht with html...they are similar, you know
Image
Luben
Posts: 568
Joined: Sun Oct 09, 2005 10:12 am
Location: #irrlicht @freenode

Post 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? :?
Post Reply