# Use ttf font in a standalone game

**URL:** <https://discourse.ioquake.org/t/use-ttf-font-in-a-standalone-game/1171>\
**Category:** dev\
**Created:** [September 7, 2018, 8:58pm UTC](https://discourse.ioquake.org/t/use-ttf-font-in-a-standalone-game/1171 "2018-09-07T20:58:15Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![zturtleman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.ioquake.org/zturtleman/32/718_2.png) [@zturtleman](https://discourse.ioquake.org/u/zturtleman)\
**Post date:** [September 7, 2018, 9:45pm UTC](https://discourse.ioquake.org/t/use-ttf-font-in-a-standalone-game/1171/2 "2018-09-07T21:45:33Z")

</div>

For compatibility with quake3 / ioquake3 engines it would probably be best to just create a replace 2d/gfx/bigchars.tga using a tools such as [Quake 3 Arena Font Builder](https://ws.q3df.org/quake_font_builder/) (which seems to have an expired HTTPS certificate at the moment).

Quake III: Team Arena uses pre-rendered TrueType fonts (`fonts/*.dat` for font information and `fonts/*.tga` for image data) to avoid shipping the actually TTF file as id Software was not permitted to by the font copyright holder. `make USE_FREETYPE=1` allows converting TrueType font to Team Arena font by setting `r_saveFontData` to 1 and loading font using

```cpp
fontInfo_t font;
int pointSize=16;
trap_R_RegisterFont("fonts/myfont.ttf", pointSize, &font);

```

Using Team Arena fonts / TrueType in Quake 3 (or actually everywhere in Team Arena) requires extensive code changes. For best results you would need to change both the engine (to render TrueType to screen resolution at run-time) and mod code to use `fontInfo_t`. (Note: It’s limited to the [first 256 Unicode code points / ISO 8859-1](https://en.wikipedia.org/wiki/ISO/IEC_8859-1#Code_page_layout).)

I’ve implemented TrueType fonts everywhere in [Spearmint Quake 3](https://clover.moe/spearmint) which replaces 2d/gfx/bigchars.tga with a TrueType by default. The mod code ([mint-arena](https://github.com/zturtleman/mint-arena/)) is licensed as GPLv3+ with ZeniMax’s additional terms from RTCW/ET.

---

_[View the full topic](https://discourse.ioquake.org/t/use-ttf-font-in-a-standalone-game/1171)._
