Use ttf font in a standalone game

Hi !
Is there any way to work with a ttf font file instead of a bitmapped font ?
I tried to simply change “bigchars.tga” by “DejaVuMono.ttf” which was in the same directory, but, of course, it doesn’t work well…

I enabled freetype with


in the terminal.

Thanks in advance

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 (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

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.)

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

1 Like

Thanks for your interest in my problems.
I will search for a custom and a bit more modern implementation if this awesome game engine.

Thanks for your two answers and your explainations.

Have a good day !

And your flavour of quake looks very nice…

I will test Spearmint on Sunday.

Have a great day !

this site creates a custom bigchars file but not the actual menu font and in game font which is font1_prop and font1_prop_glo and font2_prop so unless you’re actually getting those it’s kind of a waste of time, as you’ll never see the bigchars unless you spend all day in the terminal. they went through all that trouble just to change the entirely wrong font set… i just experienced this and am a bit livid right now because i have custom menu fonts that someone else obviously made yet there’s no solution popping up on google and i’m not going to manually attempt it as it may not come out perfect, when my problem can be solved once i simply find the menu font generator that other people are using. until then i guess i’ll keep breathing fire.