As an addendum to Raven's answer:
Dwarf fortress has four different values for font and tileset files. That is because it reuses the same symbols for both text, displaying tiles, and data. However, DF is smart enough to be able to use a tile set for only its graphics, not its text, 'mostly'. It's written for the use of the standard windows-1252 encoding (also known as latin-1 or IBM CP 437.). The reason it can somewhat separate things is because it tends to use the ASCII set for text and the Extended set for "graphics".
Here's what each of the four font value options mean:
'Somewhat' fixing the issue:
This sets the replacement images for the 256 font characters.
You can and should set this to a text font file (i.e. the default), not your tileset graphics. This prevents your tileset graphics from overwriting characters such as
If you prefer the graphics for these tiles over somewhat less legible text, you can set this to your graphics file. Be sure to set the
TRUETYPE option to
YES (see below).
This sets the replacement images for the 256 characters when the game is in fullscreen. It's usually the same as
This should be set to
YES. This allows for the override of your tileset font and instead the game will use
data/art/font.ttf for all text outside the game area, reducing the text corruption issues somewhat.
Using the above settings with regular DF will get you a game that is somewhat readable, but has a few quirks:
Graphics font packs usually leave the letters
a-zA-Z0-9 alone while modifying characters such as
éáö&. This leaves you with a few graphics in place of text, and a little text in place of graphics, but overall the game will be legible and work.
Why you are experiencing complete Mojibake, is because you are likely using a version of the tileset graphics meant for TWBT. (See more about this below). A version meant for the regular game leaves most of the alphabet alone to keep text legible.
First, sometimes extended characters are used in text (dwarven names and item qualities come to mind). These are then replaced with graphics.
Second, sometimes regular characters are used for creatures and so on. These still display as letters.
A simple tileset mod cannot fix these two issues by itself. But partially installing one for just the extended characters makes your text more legible.
The other two options
[GRAPHICS_FONT] are to be used if you want to use a creature graphics pack alongside your tileset graphics.
Graphics tilesets can also be added to dwarf fortress to have more than 256 symbols available to you, and thus to present more detail in game views. They are additional image files that contain all creatures in the game, in various states. Other things currently have no graphic set data defined for them, and still have to use the regular tileset.
They are often made to be combined with a tileset. You can mix and match, as long as you use the same pixel size for a square. (So any 16x16 tile set can be combined with any 16x16 creature graphics set).
To install such a set manually, first set the
GRAPHICS = yes option in
init.txt. Then copy in the set's
/raw/graphics folder. This contains text files telling the game where to find which graphic, as well as tile sheets. The game will automatically read all text files in this folder. The text files create in-game data objects known as tile pages with arbitrary labels pointing to the files, and add the tile page index to a creature to give it its graphic. An example to illustrate (taken from Phoebus graphics):
This creates a new tile page called
PHOEBUS_DD for use with dwarfs. It can be found in the file
/raw/graphics/doren/042.png. The tiles in it are
16x16 pixels big, and there are 60 tiles in the file: it is 12 wide and 5 tall. Then, to assign a creature to the set, you use:
This tells the game that the top-left most image (the index
[0,0]) is of an adult dwarf which currently has the "Sage" profession.
You can find a list of (a few of the) graphics tileset at the graphics tileset repository. Also see What is the different between a character set and a graphic set? for more information.
DFHack to the rescue
If you're willing to try something a little more advanced...
Thankfully, many others have found these workarounds not fully satisfying and someone has written a DFhack plugin aptly named Text Will Be Text. Also see its repository page.
This plugin will override Dwarf fortress so that it can use the full text set (both ASCII and Extended) for both
[FULLFONT]. It will use
[FONT] for text, but it will use
[FULLFONT] for tiles. This should resolve all corruption issues, but is a little bit trickier to install. Be sure to read the linked thread for instructions.
Its repository may be out of date (it currently is, just checked). You would have to rebuild the source against current DFhack (I.e. dive into the C++ code and fix it). Thankfully, someone seems to have done this for you, with an unofficial port for the latest DFhack.
If dwarf fortress updates further from here, then have a look at the changes Thurin made. If you look at the DFhack source you should be able to find the new offsets required to make this plugin work again.
Make sure that DF, DFhack, and TWBT are all compatible versions. If not, your game is likely to be unstable and crash when you least want it to. Or, more likely, version checks will fire and DFHack or TWBT will refuse to even run.