# How to add a new font

{% hint style="danger" %}
Adding new fonts is recommended ONLY for experienced developers! rcore Support is not able to help you in adding custom fonts.
{% endhint %}

1. Download swfmill - <https://www.swfmill.org/releases/swfmill-0.3.3-win32.zip>
2. Download gfxexport.exe. We can not tell you where to get this, as it’s illegal to spread - find it on Google. It should look like this

![GFXExport](https://rco.re/docs/spray/GFXExport.png)

1. put swfmill and GFxExport in a folder, put your font (must be .ttf) in the same folder
2. create file in.xml in this folder

```xml
<?xml version="1.0" encoding="iso-8859-1" ?>

<movie version="8" width="320" height="240" framerate="12">
  <frame>
    <library>
      <font id="yourfontname" import="yourfontname.ttf" name="yourfontname"/>
    </library>
  </frame>
</movie>
```

1. Make sure your font has a unique name, not "yourfontname", same in the .xml :)
2. Your folder should now look like this. Contents of GFxExport being in the previous screenshot

![Folder](https://rco.re/docs/spray/folder.png)

1. Open command line in this folder and execute the following
2. `.\swfmill.exe simple in.xml out.swf`
3. `.\GFxExport\gfxexport.exe out.swf`
4. Rename out.gfx to your font's wanted name (what the original .ttf is)
5. Put the .gfx in `rcore_spray/stream/`
6. Put the .ttf in `rcore_spray/ui/fonts`
7. The .ttf and .gfx MUST have the same name
8. Configure the font in rcore\_spray/config.lua (`FONTS` table)
