Saltar al contenido
Custom Font Maker

Custom Font Maker

Turn a TTF or OTF into the Scaleform .gfx font GTA V streams, preview it on a real game screen, and download a ready FiveM resource with the registration and draw code.

Esta documentación está en inglés por ahora.

Open the tool Last updated

The Custom Font Maker turns a .ttf or .otf into the .gfx font file GTA V needs, builds the resource around it, and shows you the result on a real Los Santos screen before you download anything. Everything runs in your browser: the font is never uploaded, and there is no converter to install.

Quick start

  1. Drop a .ttf or .otf on the page.
  2. Pick the characters to include. Basic Latin is the smallest file and covers most HUDs.
  3. Set the file name and the font name (see below, they are not the same thing).
  4. Type your text and set the scale, colour, position, wrapping, shadow and outline.
  5. Open Resource and press Download the resource.
  6. Drop the folder in your resources, add ensure <name> to server.cfg, restart.

The two names

This trips up nearly everyone, because most guides use the same word for both.

Setting What it is Where it goes
File name The name of the .gfx file in stream/ RegisterFontFile('filename')
Font name The name of the font inside that file RegisterFontId('FontName')

The tool sets both from the font you dropped and keeps them in step, so the generated code is always right. If you rename the .gfx on disk later, RegisterFontFile has to change with it, and RegisterFontId does not.

Choosing a character set

Every character you include is an outline stored in the file, so the set you pick is the whole size question.

Set What it covers Typical size
Basic Latin Letters, digits, punctuation 20 to 60 KB
Western European Plus French, German, Spanish, Portuguese, Italian, Nordic accents 30 to 90 KB
Latin extended Plus Polish, Czech, Romanian, Hungarian, euro sign, curly quotes 40 to 120 KB
Turkish Western European plus the dotted and dotless i, g breve, s cedilla, lira 30 to 90 KB
Cyrillic Basic Latin plus Russian and Ukrainian 30 to 90 KB
Greek Basic Latin plus the Greek alphabet 25 to 70 KB
Everything in the font Every character the font has a glyph for anything up to megabytes
Only these characters Exactly what you type as small as it gets

The panel shows the real glyph count and the real byte size as you change the set, so you never have to guess. A character your font does not have is dropped and counted, and the panel says how many.

Tip

If your HUD only ever draws numbers and a handful of words, use Only these characters. A speedometer font can be under 5 KB.

Reading the preview

The preview is not your browser rendering the font you uploaded. The page builds the .gfx, reads it straight back, and draws the glyph outlines that came out of the file. So the letter shapes, the spacing, the line breaks and any empty boxes are exactly what your players will get.

Two things it is honest about rather than exact:

  • Size. GTA works the final text height out from the font’s own ascent, so there is no single formula. The preview is close. If you need the real number, read it in game with GetTextScaleHeight.
  • Edges. The drop shadow and outline are drawn the way the game draws them, but not pixel for pixel, and nothing in a browser can show you the game’s own antialiasing.

Switch to the All glyphs tab to see every character in the file at once. That is the fastest way to spot a font that converted badly.

The draw code

The Draw code tab has the snippets people actually need: registering the font, a plain DrawText, one with a shadow and outline, one wrapped and justified, text longer than 99 characters, text over a point in the world, and using the font from another resource.

Every one of them has a Lua / JS / TS / C# switcher above it and prints the same code in whichever runtime you pick. The choice is remembered and every code block on the site follows it.

The order matters more than anything else here:

Lua
SetTextFont(fontId)            -- every Set call
SetTextScale(0.0, 0.5)         -- comes first
SetTextColour(255, 255, 255, 255)
SetTextDropshadow(0, 0, 0, 0, 255)
SetTextDropShadow()
SetTextOutline()
BeginTextCommandDisplayText('STRING')
AddTextComponentSubstringPlayerName('Hello')
EndTextCommandDisplayText(0.5, 0.5)

Anything you set after BeginTextCommandDisplayText is accepted and quietly does nothing to that piece of text.

Things that go wrong

What you see Why, and what to do
The stock font for a moment, then yours Normal. RegisterFontFile queues the file and the client streams it in over the next frames. No native reports when it is ready, so wait before you draw. The generated client.lua already does.
The stock font forever A hardcoded font id. RegisterFontId returns an index into a list built while the client runs, so it shifts if another resource registers a font first. Keep the value you were handed.
Empty boxes for some letters Those characters are not in the file. Rebuild with a wider character set, or check that your font actually has them.
Your colour or scale ignored The call came after BeginTextCommandDisplayText.
Centring does nothing SetTextJustification needs SetTextWrap to have a box to work inside.
Text cut off at 99 characters One text component carries 99 characters. Split the string and add it in pieces.
Nothing happens at all RegisterFontID with a capital D is not a native. It is RegisterFontId.

Checking a font somebody else made

The Check a font file section at the bottom of the page reads a .gfx or .swf and tells you what is really in it: whether it is a Scaleform container or just a renamed Flash file, the name to pass to RegisterFontId, how many glyphs it holds, whether the space character is there, and whether the outlines survived the conversion. It draws every glyph it finds, so a font that converted to blanks is obvious in a second.

Use it when a font you were given draws as empty boxes in game and you want to know whether the problem is the file or your code.

Privacy and licensing

Nothing is uploaded. The font is read, converted and packed into the zip in your browser, and the tool has no server side at all.

Fonts are licensed work. Shipping one in a resource embeds it, which many licences do not allow. Check the licence of the font you are about to put on a server.