Project Backups With Custom Files
Hughtech opened this issue · 3 comments
First, let me state that i'm not sure if this is a bug, but i have come across custom fonts placed in the working directory of a gmx project, disappearing at runtime.
to reproduce, create a project. Place your custom font file in the same project you have created. In the create event of an object, place this code
myfont = font_add("Magic_Sparkle.ttf", 24, true, true, 32, 128)
replacing "Magic_Sparkle.tff" with the name of the font you are using.
In the draw event
draw_set_font(myfont)
draw_text(x, y, "Some Text and numbers...0123456789")
Save it and run.
At first run, it will work but running it after that, the font disappears.
However if your test project is a gmk file, and the font file is in the within same directory, it works fine and the font remains.
@Hughtech it's the backups mechanism... if your font is inside the GMX... then LGM is renaming the GMX containing the font to the backup name and then writing the project. The backups mechanism doesn't account for users placing their own files into the project folder. I am not sure if it's a good idea for us to support this or not but we could by changing the rename of the project to a file/directory copy and then writing the project.
That's good and yeah that's technically the more correct thing to do! 👍