TEN: Making Custom Fonts - Tomb-Raider-Level-Editor/Tutorials GitHub Wiki
Written by Frjttr
In this post I will show how to create a custom font starting from an installed TrueType Font., and not from a bitmap (TRLE method).
- Download MakeSpriteFont from GitHub (https://github.com/microsoft/DirectXTK/wiki/MakeSpriteFont), I suggest to archive the downloaded MakeSpriteFont.exe in a dedicated folder.
- Open Windows Terminal as Command Prompt.
- Write CD and drag and drop the folder containing MakeSpriteFont.exe inside Windows Terminal, (as this will paste the path of the folder inside the Terminal), then press Enter. (If you use the old Command Prompt instead of the new Windows Terminal, please copy the folder path manually inside quotes "path/file")
- Verify the name of the chosen font from "Font Settings" under Full Name, as shown in the attached picture.
- On the opened Windows Terminal window, write MakeSpriteFont "fontfullname" "font" /FontSize:64 replacing fontfullname with the Full Name as written on Font settings. The field "font" can be left as it is, as for TEN you will then need a file named font.spritefont. The font sizes that I suggest are either 32 or 64, but, so far, I've never used 32.
- Copy the font.spritefont inside the Engine/Textures folder in your project. When launching the game you will have the new font. And that's done 🙂
Note #1: if you'd like to chose another style for the font, add on the line /FontStyle:value (only possible values: Regular, Bold, Italic, Strikeout, or Underline). Note #2: this tutorial is for TEN only, the font change is applied globally for the whole project, hence the font settings within Tomb Editor do not apply to TEN.
example of use with powershell terminal