fonts with specific letters, not entire alphabet

bsabiston

Member
If you want to create a font with just specific letters, like for a giant title, do you have to add ranges for each letter if they aren't next to each other in the alphabet? And do you have to figure out yourself what the ASCII values are? Isn't there some way of just typing, for example "MY TITLE" in there and having it add just those letters? There must be, I just am not seeing it...
Thanks for any help!
 

CMAllen

Member
Alternatively, use font_add_sprite_ext() function. You can use that to create a custom font (note: run-time functionality only) from a sprite asset and define what characters are in the font and in what order. Easy, peasy. This can also be used to create highly-stylized fonts and non-text characters (like a [Shop] button image).
 

bsabiston

Member
Anyone know how to do this? I did it at one point, but now have forgotten. There's a way to do it in the IDE.
 

bsabiston

Member
Thanks but that doesn’t work - it adds the entire range of letters between your highest and lowest characters. For instance if you just wanted A and M, you would get the whole alphabet between A and M.

I tried everything I could think of and eventually had to add a single character range for every character in my title by looking up the ascii. Can’t believe they make this so hard.
 

bsabiston

Member
No - as I say, it adds the entire range of the alphabet which includes the letters you type and every letter in between.
 

obscene

Member
Did a quick test by adding the word Test to a new font. It created two ranges, one for E, and one for ST. It's a little different in GMS2 apparently but it should look like this if you do it right. Click add range, type the letters, click add range button on the right.

upload_2018-12-16_13-53-20.png
 

bsabiston

Member
Wait I’m confused. If you tried it in GMS 2, why did you say “it’s a little different in GMS2 apparently”? I tried it many times yesterday with the latest version and it didn’t work for me. Tried it with the ‘use file’ option too where I just made a file with my title in it. Didn’t work.
 

TheouAegis

Member
Why don't you just make a Sprite out of the entire title? It's a lot more memory for game maker to draw a string of characters than it is for it to draw one single image, and by the sounds of it you only need it for one single image.
 

bsabiston

Member
I don't think that is true about the amount of memory required - besides, I do animated effects with the different letters. Anyway as I said I did get it to work by manually specifying a separate range for each individual character. I just wondered if this feature in GMS2 is broken or if there is some secret way to do it that I could not figure out.
 

obscene

Member
Wait I’m confused. If you tried it in GMS 2, why did you say “it’s a little different in GMS2 apparently”? I tried it many times yesterday with the latest version and it didn’t work for me. Tried it with the ‘use file’ option too where I just made a file with my title in it. Didn’t work.
My first post (way back when) was in GMS1. The screenshot today was me just trying it out in GMS2 and yes it's different but it completely, totally works...
 

bsabiston

Member
Yeah that’s what I did - I don’t know why it isn’t working. Like I said in the original post I’m pretty sure it worked before. Maybe just need to restart my computer.
 

obscene

Member
That's crazy. I'm sure you've tried restarting. A different font. Assign it to a different texture group, etc. But you've got some kind of bug going on there... no wonder you are frustrated lol. Doing it all right. :)
 
Top