Page 1 of 1

I tried compressing my game into a love folder but it's having issues with the ttf file

Posted: Fri Jan 06, 2023 3:42 pm
by MaxGamz
I already checked and there was a post stating that I simply had to change the extension from TTF to ttf, but after doing this love still won't recognize the file after being zipped, are there other options?

Re: I tried compressing my game into a love folder but it's having issues with the ttf file

Posted: Fri Jan 06, 2023 5:52 pm
by Andlac028
Do you have any reproducible example?

Re: I tried compressing my game into a love folder but it's having issues with the ttf file

Posted: Fri Jan 06, 2023 5:57 pm
by MaxGamz
Andlac028 wrote: Fri Jan 06, 2023 5:52 pm Do you have any reproducible example?
I can send the .love file but I think the issue isn't the ttf file. I tried using an image font instead and I'm having the same problems. It runs perfectly on VS code but the .love file won't work.

Re: I tried compressing my game into a love folder but it's having issues with the ttf file

Posted: Fri Jan 06, 2023 6:03 pm
by Andlac028
MaxGamz wrote: Fri Jan 06, 2023 5:57 pm
Andlac028 wrote: Fri Jan 06, 2023 5:52 pm Do you have any reproducible example?
I can send the .love file but I think the issue isn't the ttf file. I tried using an image font instead and I'm having the same problems. It runs perfectly on VS code but the .love file won't work.
You are using file-system that is case-insensitive (probably NTFS on Windows), but ZIPs are case-sensitive, so you have to make sure, you provide exactly same name - your image font is at "Sprites/Imagefont.png", but you access it with "Sprites/imagefont.png", so make sure, all letters are in same case (this is why correct case of extension fixed problem you found). After changing lower case i to upper case I (first letter of imagefont) in main.lua, game loaded correctly.

Re: I tried compressing my game into a love folder but it's having issues with the ttf file

Posted: Fri Jan 06, 2023 6:53 pm
by MaxGamz
Andlac028 wrote: Fri Jan 06, 2023 6:03 pm
MaxGamz wrote: Fri Jan 06, 2023 5:57 pm
Andlac028 wrote: Fri Jan 06, 2023 5:52 pm Do you have any reproducible example?
I can send the .love file but I think the issue isn't the ttf file. I tried using an image font instead and I'm having the same problems. It runs perfectly on VS code but the .love file won't work.
You are using file-system that is case-insensitive (probably NTFS on Windows), but ZIPs are case-sensitive, so you have to make sure, you provide exactly same name - your image font is at "Sprites/Imagefont.png", but you access it with "Sprites/imagefont.png", so make sure, all letters are in same case (this is why correct case of extension fixed problem you found). After changing lower case i to upper case I (first letter of imagefont) in main.lua, game loaded correctly.
Thanks for the help, I didn't pay close enough attention to the cases