[Guide] How to make Custom Terraria Fonts

Rhoenicx

Terrarian
OUTDATED, Terraria 1.3.5 and up uses another font extension to include more languages

Hello Terraria!

I did some research for my texturepack and i discovered how to make Custom Fonts!
I'd like to share this with you guys, so lets get started!


The things you'll need.
- The font you want to use (only use non-copyrighted fonts)
- Microsoft Visual Studio C# 2010 express
- XNA game studio 4.0
- Games for Windows Live (if you are on Windows 8 or 10)
- XNB builder
- A text editor that can save files with extension "all files" (notepad++)

Install order:
1. Microsoft Visual Studio C# 2010 express
2. Games for Windows Live
3. XNA game studio 4.0

Creating a font:
1. Open your text editor, make a new file and put these lines inside:
<?xml version="1.0" encoding="utf-8"?>
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">
<FontName>Name_of_font_here</FontName>
<Size>Font_size_here</Size>
<Spacing>0</Spacing>
<UseKerning>true</UseKerning>
<Style>Regular</Style>
<CharacterRegions>
<CharacterRegion>
<Start>&#32;</Start>
<End>&#252;</End>
</CharacterRegion>
</CharacterRegions>
</Asset>
</XnaContent>
2. Have a look inside "X:\Program Files (x86)\Steam\steamapps\common\Terraria\Content\Fonts" for the names you need to save your text files.
3. Edit the font name that you want to use, also do this with the size. (I recommend using 32 for "Death_Text" and 16 for all other fonts)
4. Save the text files as ".spritefont".
5. Open XNB builder (when downloaded it is called XNAFormatter.zip, and extract the files to a new folder)
6. Run XNAFormatter.exe
6. Select the .spritefont files and click convert.
7. Move (and rename if you ahve not done this) the files to the location in step 2.
8. Start the game!
9. You now have your own Font!


If something is not clear about this guide, leave a reply and i will have a look at your problem(s).
Note#1: I can help with most of the errors from visual studio or XNAFormatter.
Note#2: I do not know how to add symbols from languages like russian etc.
Note#3: Only works on PC version.
Note#4: I have no idea if you can make a font with a MACOSX Computer.
 
Last edited:
First install the font into windows, then just type the name like "<fontname>Arial</fontname>" or "<fontname>Times New Roman </fontname>".
You can find the names in almost every text editor, i suggest using wordpad.
 
Another method is to create a new SpriteFont class and replace origin font's image to the image drawn by GDI. In that way, you can access every font supported by your operator system.
 
Another method is to create a new SpriteFont class and replace origin font's image to the image drawn by GDI. In that way, you can access every font supported by your operator system.
For your method you will need the source code and it is not up to date right now :/ But it is an idea!
 
Hmm no idea what's wrong ... it is a long time ago i made this thread, maybe some programs updated, will look into it...
 
Back
Top Bottom