Page 1 of 1

Using Custom Fonts?

Posted: Wed Oct 21, 2020 12:40 pm
by DigitalDesignDude
Hey, just wondering how to go about replacing the default DSGM 5.12 font with one that I design myself with pixel art.

I tried overwritting the pixels in the "Default.png" font located in "C:\Program Files\DS Game Maker\Fonts" but my games complie with no changes.

Also tried adding a new 256px x 72px font .png in the DSGM fonts folder but I can't use it without DSGM showing a warning that I'm missing a .c file for it.

Borrowing one of the other .c files from another font and just renaming it didn't work either.

Thanks for any help.

Re: Using Custom Fonts?

Posted: Wed Oct 21, 2020 1:18 pm
by Ruffsta
personally any custom fonts i use i go to a font site and type in the text i want in the font i want and then save it as an image and then put it on a background.. but i don't know anything about using custom fonts themselves in dsgm. but i did ask James to reply...

Re: Using Custom Fonts?

Posted: Wed Oct 21, 2020 1:41 pm
by DigitalDesignDude
Thanks for asking James for me.

Unfortunately, I can't use pre-rendered text art because I need a font for displaying dynamic values in my UI.

Using 8x8 sprites could be a backup, but then I have to sort of reinvent the wheel with my own text system. Would rather just use DSGM's built in text system.

Re: Using Custom Fonts?

Posted: Sat Oct 24, 2020 12:36 pm
by imadedsgamemaker
It sounds like the fonts come in pairs of PNG and C files. The C file will have been generated by "PAgfx", the PAlib graphics tool. Remember, the DS doesn't understand how to decode PNGs (it could do that, but it would be super slow). It needs the graphics in a format PAlib exports - something that can be quickly 'moved' from the game to the screen memory - ie a palette of colours, and a set of pixels (in the right order) referencing the colour they should be in the palette.

I don't know how the C files for the font PNGs get/got generated - do they look like they come with the software?

In which case, you're most likely stuck with the ones that come with DSGM. It's going to be almost-impossible to figure out how they got generated all those years ago.

Re: Using Custom Fonts?

Posted: Sat Oct 24, 2020 1:55 pm
by DigitalDesignDude
Thank you for your response James,

I can see how this won't be doable at this time.

The fonts' C files are located in the "CompiledBINs" folder inside the DSGM program folder. So they do look like they came with the software.

The .pngs are in the "Fonts" folder within the DSGM program folder too.

There are also _Map.bin and _Tiles.bin files that are also required in order to use a font it seems.

Regardless, I'll just stick with the default fonts for now.