• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

[FIXED] Change spacing between text?

T

tamation

Guest
I have an established custom font with font_add_sprite, it's proportional and the separation is set to 1. The actual size of the sprite is 3x5 for all characters, and because of this whenever a space occurs in text, for example "Hello World", the space itself takes up 5 pixels, three for the size of the font and 2 on each side for the separation, my issue is that I want the spaces to be only 3 pixels wide, while still keeping the separation of 1 pixel for the normal text. Is there a way of doing this?
 

YellowAfterlife

ᴏɴʟɪɴᴇ ᴍᴜʟᴛɪᴘʟᴀʏᴇʀ
Forum Staff
Moderator
Adding pixels to the space character in the font will cause it to use that as space width (while not rendering them on screen)
 
T

tamation

Guest
Adding pixels to the space character in the font will cause it to use that as space width (while not rendering them on screen)
Ah yes, thank you! I tried this before by adding a pixel on the right side, but didn't realise gamemaker didn't register blank parts in sprite when it comes to spacing. A 1 opacity line to the right of all images fixed this however.
 
Top