GR - Fonts

Fonts in Galactic Ruler are created using this tool. See below for how to create a font.

External References
All information in this section is derived from: https://github.com/microsoft/DirectXTK/wiki/MakeSpriteFont

Converting True type fonts to spritefonts
The MakeSpriteFont tool is available in the above section

command line execution is also covered in the above repo.

The following is a guide to adding .ttf's to your system: https://www.barcodefaq.com/knowledge-base/ttf-install/

Converting Bitmap fonts to spritefonts
All characters need to be enclosed in a pink grid for the tool to function. Instructions can be found in the MakeSpriteFont repo

The following is a guide to enclosing an image in a grid for GIMP: https://smallbusiness.chron.com/make-grid-gimp-54652.html

Command line usage is covered in the MakeSpriteFont Repo

Debugging spritefonts
For ensuring that the spritefonts are what you expected; The MakeSpriteFont repo contains spritefontdump.cpp file

it requires dds.h which can be found here: https://github.com/microsoft/DirectXTK/tree/master/Src


 * 1) include


 * 1) include 

add these two dependencies on top of the dds.h file and compile the program

Command line usage: CompiledProgramName test.spritefont

This will create a test.dds file that can be viewed in GIMP