GameMaker Sprite font messed up after moving project file

Geoff Jones

Member
Hello all,

After moving my project folder to a new location, the spacing between the font in-game is messed up. I literally only moved the project file, nothing else has changed. The issue is repeatable. an example below: (I'm using a sprite font.)

Any ideas?

Cheers

code:
Code:
global.smallfont= font_add_sprite_ext(s_fnt_small, "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890~=,.!?><[]'{}:;$@#&|_-+*()[]^ ", true, -1)
messed up
font 1.PNG

correct
font 2.PNG
 

YanBG

Member
Looks like there is space between the letters. Try re-importing the image into the font sprite?
 

YanBG

Member
Why did you move it? Bring it back maybe? Could be because of the main drive and sandbox folders.
 

Geoff Jones

Member
I reinstalled windows on a new fresh hdd. I still have the old installation of windows on the old drive. Going back to that drive and it works, but the new drive it doesn't.
Opening the project from the location on the old drive doesn't work either... I can't see any logical reason as to why this isn't working.
 

Geoff Jones

Member
Fixed it by copying all of the files from the user/roaming/gamemaketstudio2 from the old drive to the new one... No idea why that fixed it, but I'm glad it did...
 

Geoff Jones

Member
Now it';s back to not working....
I've narrowed it down to somethgin in the C:\Users\Geoff\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE\Code_of_th_2B4998_BFEFAC74\Code of the Savage\default\TexturePageEntries folder
 

Geoff Jones

Member
I made an entirely new blank project with nothing but the front. So its blank project, new sprite, new names and it still wont work. What seems to be happening, is it's not clipping all of the blank space around the font:
I made sure that the empty area around the sprite is %100 empty and not some silly 1% black colour.

Code:
font=font_add_sprite_ext(s_font, "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890~=,.!?><[]'{}:;$@#&|_-+*()[]^ ", true, -1)
here is what a "...." should look like, and how it always worked before this mess happened.
dot-correct.png

here is what it looks like now:
dot-incorrect.png

Here is the font sprite:
upload_2018-12-26_19-56-53.png
 

Morendral

Member
Maybe try changing the sep from -1 to 0 in the code. It looks like a spacing issue, and that looks to be the most likely culprit to me
 

Geoff Jones

Member
I understand that, I'm suggesting playing with the value to see if it changes the outcome.
Oh yeah, I've played with the value. it does change the spacing between letters. The issue is that proportional set to true, doesn't seem to be clipping all of the blank space correctly.
 

mar_cuz

Member
In the image editor try the magic selection tool for all the empty space around the letters and delete it this has solved some similar issues for me
 

Geoff Jones

Member
In the image editor try the magic selection tool for all the empty space around the letters and delete it this has solved some similar issues for me
Did that already, no go :( Plus im using the exact same image file that has always worked before.
 

YanBG

Member
Yeah i'd go with "fixing" the image, cut and re-position all letters to connect eachother, so there is no space to their right.
Edit: oh wait, you have the space because a symbol on the lower rows.
I'm with 1.4, but could have been a GM update you didn't have before or change to the YoYo code that didn't affect you before for whatever reason. When talking about very huge projects and software i'm not surprised when stuff like this happens.
Imagine the source code of a AAA game and new team joins to change only a button in MP, which leads to whole servers shutting down.
 
J

Jack Bennett

Guest
Is the font fully dependant on the image, or are you defining the space in code as well? If it's the image, then you might just need to get rid of the space in between the letters. I don't know why it's just suddenly broken though :confused:
 

Geoff Jones

Member
Yeah i'd go with "fixing" the image, cut and re-position all letters to connect eachother, so there is no space to their right.
Edit: oh wait, you have the space because a symbol on the lower rows.
I'm with 1.4, but could have been a GM update you didn't have before or change to the YoYo code that didn't affect you before for whatever reason. When talking about very huge projects and software i'm not surprised when stuff like this happens.
Imagine the source code of a AAA game and new team joins to change only a button in MP, which leads to whole servers shutting down.
Yeah, I've submitted a bug report. That's all I can narrow it down to. I've ruled out everything else. Even created yet another blank project with a single character font that is 1 pixel wide, and it still adds a 1 pixel buffer on either side of the character.
It'd still be great if someone running 2.x can try my test project and let me what they get. https://www.dropbox.com/s/9lh6km9wqy7bv6b/font test.rar?dl=0
 

Geoff Jones

Member
Is the font fully dependant on the image, or are you defining the space in code as well? If it's the image, then you might just need to get rid of the space in between the letters. I don't know why it's just suddenly broken though :confused:
I'm defining the space by setting the font as a proportional font. I can't get rid of the space on all the letters, because not all the letters are the same width. Otherwise, that would work.
 

SaKo

Member
Sorry for bringing this thread back but I'm having the exact same problem and it's frustrating. No issues at all previously but some update a few months ago introduced the bug. Hope this gets fixed soon.
 

Geoff Jones

Member
Sorry for bringing this thread back but I'm having the exact same problem and it's frustrating. No issues at all previously but some update a few months ago introduced the bug. Hope this gets fixed soon.
Go back to a previous version in the meantime. The bug has apparently been fixed and will be in the next version.
 
Top