---
name: "Arma 3: Adding Custom Fonts"
type: topic
source: https://community.bistudio.com/wiki/Arma_3:_Adding_Custom_Fonts
revid: 364440
updated: 2024-05-16T09:44:58Z
---

# Arma 3: Adding Custom Fonts

This tutorial explains how to get a font into Arma 3.

> **Disclaimer: This page describes an unofficial tool created without permission or support of Bohemia Interactive.**
>
> The product itself and its usage may be violating rights of Bohemia Interactive and is in no way endorsed or recommended by Bohemia Interactive.
>
> See also **Official Tools**.

### Requirements

- Arma 3
- [Arma 3 Tools Launcher](../topics/Tools_Launcher.md) (from [Steam](../topics/Steam.md))
- a Windows machine capable of running Powershell scripts
- this unofficial Powershell script: https://github.com/Nelis75733126/Arma_3_FontToTGA_Helper/
- a mouse and keyboard might be handy :P :P

### Definitions

| Term | Meaning |
|---|---|
| Arma 3 Tools | [Arma 3 Tools Launcher](../topics/Tools_Launcher.md) |
| `CfgFontFamilies` | this refers to a `class` type that can be put inside a [config.cpp](../topics/Config.cpp~2Fbin_File_Format.md) file. |
| `.tga` file format | Used for textures. In this context, TGA files are used to store all characters of a font. |
| `.paa` file format | Also used for textures. Arma 3 uses TGA files converted into PAA files to display text. |
| `.fxy` file format | This contains information about where each character of a font is placed in a particular texture file. |
| FontToTGA.exe | A command-line tool included with Arma 3 Tools. It converts fonts into TGA files. More details here: [FontToTga](../topics/FontToTga.md) |
| ImageToPAA.exe | A tool also included in Arma 3 Tools which can be used to convert TGA files into PAA files. More details here: [ImageToPAA](../topics/ImageToPAA.md) |

### Steps

The idea is that fonts (TTF or OTF) can be converted into TGA files by `FontToTGA.exe`.
Every time `FontToTGA.exe` is called, one of the required parameters is a specific font size in `pt` size format.

1. `FontToTGA.exe` will then generate `.fxy` files and `.tga` files.
1. Then, ImageToPAA.exe can convert the TGA files created by FontToTGA.exe into PAA files.
1. Then the `.fxy` and `.paa` files should be moved into an Addon. See [Arma 3: Creating an Addon](../topics/Creating_an_Addon.md) to learn how to make one.
1. Then, inside of the addon's config.cpp, there should be an entry for each font you want to add, so that the game knows for what to look. Here is an example of that `config.cpp`:

   ```cpp
   class CfgPatches
   {
       class TAG_Custom_Fonts
       {
           name = "SOMETHING - UI fonts";
           author = "your name";
           url = "https://github.com/yourname";
           requiredVersion = 0;
           requiredAddons[] = {};
           units[] = {};
           weapons[] = {};
           skipWhenMissingDependcies = 0;
       };
   };

   class CfgFontFamilies
   {
       class BebasNeue
       {
           fonts[] =
           {
               /*
                   these are just four examples to make this example shorter.
                   normally, there would be a lot more entries in here as explained below.
               */
               "TAG_Custom_Fonts\Fonts\BebasNeue\BebasNeue10", // the number at the end refers to the size of the font in pt
               "TAG_Custom_Fonts\Fonts\BebasNeue\BebasNeue11",
               "TAG_Custom_Fonts\Fonts\BebasNeue\BebasNeue12",
               "TAG_Custom_Fonts\Fonts\BebasNeue\BebasNeue100" // it can go higher than that, but 100 is pretty big :)
           };
       };
   };
   ```

### Config

Each added font requires a `class theNameOfTheFont` in the `class CfgFontFamilies` brackets.
If you want to add multiple fonts, simply do it like so:

```cpp
class CfgFontFamilies
{
    class SomeReallyNiceFont
    {
        fonts[] = {}; // should be filled with strings
    };

    class MonoSpaceFontMaybe
    {
        fonts[] = {}; // should be filled with strings
    };

    // and so on - add as much as you like
};
```

> [!NOTE]
> The classname you use will be the exact name that you later will use in the `font = "fontName";` property to get that font to appear in UI elements.

The name itself makes no difference as long as it does not conflict with an existing font.
Thanks to the creator of the Powershell script (as linked earlier), the config is generated for you.
The only thing you need to do is copy it and paste it in the right place.

#### Fonts Array

This will all be generated by the Powershell script :)\
It is a list of strings where each string refers to the path of each size of the font that was generated.
If you want really big text in the game, then the appropriate size in pt has to be generated.\
If the text inside of a UI element is much larger than the biggest available texture, the text will look ugly simply because the game will scale the texture up to the requested size.\
By default, the Powershell script will generate a bunch of sizes to make sure that the font will look good through a wide range of sizes;
but it is also capable of using provided custom sizes. Using the default values is fine.\
If you only want a very specific size of the font, you can use the Powershell script to get that. The script itself tells you how.

### Process

1. Read the instructions for the Powershell script, then execute that script.
1. Once done, you should have a bunch of `.fxy` and `.tga` files inside the Fonts folder of where `FontToTGA.exe` is located. Unless you provided another location to the Powershell script.
1. Now it is time to let `ImageToPAA.exe` convert all the `.tga` files into `.paa` files. Start it up and just look at the interface to see how it works. It is pretty straightforward.
1. Once all PAA images are generated, copy the `.fxy` and `.paa` files into a directory where you can let [Addon Builder](../topics/Addon_Builder.md) (also included in Arma 3 Tools) make a PBO from. The instructions on how to use [Addon Builder](../topics/Addon_Builder.md) can be found [here](../topics/Creating_an_Addon.md#addon-builder).
1. Now pay close attention to the config for `class CfgFontFamilies` that was generated by the Powershell script: each string in the `fonts[] = {};` list will contain the path to where the `.fxy` and `.paa` files should be placed.

   An example:

   ```cpp
   fonts[] =
   {
       "TAG_Custom_Fonts\Fonts\BebasNeue\BebasNeue10"
   };
   ```

   The `TAG_Custom_Fonts` is a reference to the class used inside the addon `config.cpp`'s `class CfgPatches`.\
   In the example above, there should be a folder called Fonts in the same folder as `config.cpp`.\
   Create it if missing, and then take the folder with the font's name (the one inside the `FontToTGA.exe`'s Fonts folder) and put it in there.

   > [!NOTE]
   > It is up to you if you want to keep or delete the `.tga` files.
1. Double-check everything and make sure the `config.cpp` for your addon has been set right. If so, build it using [Addon Builder](../topics/Addon_Builder.md).
1. Add it to the launch options of the game. Instructions for that can be found elsewhere.
1. Start the game, go into the 3DEN editor, open the config viewer, double-click on `configFile`.
1. Type `CfgFontFamilies`. It should scroll the list to where it is.
1. Double-click it and it should show the font you have added :)
1. If so, then your font is ready to be used in the game. To see it, make sure any Dialog/Display control with a `text` property has `font = "theFontYouAdded";` in it and you should be able to view the font!

<sub>Source: [BI Community Wiki — Arma 3: Adding Custom Fonts](https://community.bistudio.com/wiki/Arma_3:_Adding_Custom_Fonts) (revision 364440).</sub>
