SOLVED Custom font looks weird because "space" character is almost invisible

meme

Member
Hey guys I used my own custom font, but the problem is that the space (" ") looks weird making a sentence into 1 word with no gap. This is what I meant:

(What I wrote: "TIPS : There might be some repeating patterns between levels, SORRY")
1612957375235.png

This is how I created the font:
GML:
global.pixelFont = font_add_sprite_ext(suFont,
                    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"+
                    "!@#$%&*()_-+={[}]|\\:;\"\'<,>.?\/ ", true, 1);

Is there any other way to make the font better?
 

FoxyOfJungle

Kazan Games
You do not need to declare the space in the string, remove the space " "

{[}]|\\:;\"\'<,>.?\/ "
................................^

Also remove the invisible image at the sprite font.
 

meme

Member
Oh I solved it! Just draw a shape of desired width on the blank frame which will act as a whitespace. Gamemaker won't show this shape if you assign this blank frame as a whitespace :).
 

gnysek

Member
From my expirience, if you add " " into character list on sprite fonts, you can't use empty sprite for space - you need to put there image with width of space you want to get, and GM will compute it from filled pixels width :)
 

meme

Member
From my expirience, if you add " " into character list on sprite fonts, you can't use empty sprite for space - you need to put there image with width of space you want to get, and GM will compute it from filled pixels width :)
Yes, that is what I meant :D
 

gnysek

Member
Yeah, your post wasn't yet visible when I started to write mine, that's why it sounds I'm explaining it again :p
 
Top