Modifying graphics inside a .TTF font
This guide explains how to replace an existing glyph inside a TrueType font with your own logo, symbol, text or other artwork using Inkscape and FontForge.
What you need
Software
You'll need:
Inkscape
Used to create or convert artwork into vector paths suitable for a font.
FontForge
Used to open the .ttf, edit individual glyphs, import your SVG and generate the modified font.
Both are free and open-source.
Files
You'll need:
- The original
.ttffont you want to modify - Your replacement image/logo/design
- A backup copy of the original
.ttf
For example:
r3_symbols.ttf ← original
r3_symbols_backup.ttf ← untouched backup
retro_logo.png ← replacement artworkIMPORTANTAlways keep the original font.
If something goes wrong during conversion, scaling or generation, you want an untouched copy to return to.
Understand what you're actually editing
A .ttf isn't limited to ordinary letters.
A font can contain glyphs representing:
A → letter
0 → digit
@ → symbol
U+Exxxx → custom/private symbolBut a game can use those glyph slots for practically any vector artwork.
For example, a glyph associated with:
0could visually contain a game logo instead of the number zero.
The game doesn't necessarily care that Unicode calls the glyph DIGIT ZERO. It may simply request that glyph from the font because the developers assigned their UI graphic to that position.
IMPORTANTDo not change the glyph's codepoint simply because you're replacing its artwork.
If the game expects the graphic at a particular glyph position, your replacement needs to remain there.
Open the font in FontForge
Launch FontForge and open your original font:
File → Open
Select, for example:
r3_symbols.ttfYou'll see FontForge's font view containing a grid of glyphs.
Some may look like ordinary characters, while others may contain logos, UI symbols, vehicle components, controller icons, arrows, etc.
Find the glyph you want to replace.
Double-click it.
This opens the Glyph View.
Prepare your replacement artwork
If your replacement is already a clean SVG made from vector paths, you can skip the raster tracing section.
If you have something such as:
PNG
JPEG
JPGit is a raster image.
Simply changing:
logo.pngto:
logo.svgdoes not make it vector artwork.
It needs to be traced.
Import the image into Inkscape
Open Inkscape.
Use:
File → Open
and select your PNG/JPEG.
If Inkscape displays an image import dialog, choose:
Embed
Embedding keeps the raster image inside the Inkscape document while you work.
Trace the bitmap
Select the imported image.
Then open:
Path → Trace Bitmap
For a simple black-and-white logo, select:
Single scan
with:
Brightness cutoff
You'll see a Threshold setting.
For clean black artwork on a white background, something around:
0.450can be a good starting point.
There isn't one correct threshold for every image.
Adjust it while watching the preview.
You want:
- Clean outer edges
- Internal holes preserved
- Thin details preserved
- Minimal noise
- No accidental merging of nearby shapes
For example, if your logo contains:
R
O
P
Amake sure the holes inside those letters remain holes.
Increasing the threshold too much can cause narrow openings to close.
Once the preview looks good, click:
Apply
Find the traced vector
This confuses people the first time.
After clicking Apply, it can look like nothing happened.
Inkscape places the newly created vector directly on top of the original image.
With the trace selected, the status bar should identify it as something similar to:
Path 216 nodesrather than:
Image 1305 × 1206Move the selected object slightly.
You should now see:
Vector trace
and
Original raster image
as two separate objects.
Remove unwanted backgrounds
Suppose your original image looks like:
+-----------------------+
| |
| PROJECT |
| RETR0 |
| |
+-----------------------+where the entire background is black or white.
IMPORTANTYou don't want that background becoming part of the glyph.
A font glyph should contain the actual artwork rather than a giant rectangular background.
If the traced background is part of the vector, select the traced object and use:
Path → Break Apart
Shortcut:
Ctrl + Shift + K
You can then select the large background shape and delete it.
IMPORTANTBe careful here.
Break Apart can also separate internal contours responsible for holes. Make sure letters such as O, R, P, etc. still look correct afterward.
Check the vector carefully
Before exporting, zoom into the artwork.
Check:
Edges
They should be reasonably smooth rather than visibly following individual pixels.
Holes
The centres of letters such as O should remain empty.
Small details
Make sure tracing didn't remove thin lines.
Background
There should be no giant rectangle behind the artwork.
Remember that a TTF glyph fundamentally consists of vector contours, not a normal full-colour image.
Creating replacement text
If you're replacing text such as:
REAL RACING
with:
PROJECT RETR0
IMPORTANTdo not create a screenshot of the new text and trace it.
There's a cleaner method.
In Inkscape, select the Text Tool and type:
PROJECT RETR0Choose the font, weight, spacing and proportions you want.
When you're happy with it, select the text and use:
Path → Object to Path
Shortcut:
Shift + Ctrl + C
The text is now vector geometry.
This is important because otherwise the SVG can still depend upon the original font being available.
After conversion, PROJECT RETR0 is no longer text as far as the file is concerned. Each letter is made from vector paths.
That is exactly what we want for FontForge.
Save the SVG
Once the artwork is ready:
File → Save As
Choose:
Plain SVG
For example:
project_retro.svgPlain SVG is useful here because it avoids carrying unnecessary Inkscape-specific document information into the import.
Return to FontForge
Go back to the glyph you want to replace.
Before deleting anything, make sure you're editing the correct glyph.
If you want to completely replace its artwork:
Ctrl + A
then:
Delete
This deletes the existing outlines from that glyph.
It does not mean you should delete the glyph slot itself.
You want to preserve the original glyph's encoding/codepoint.
Import the SVG
Inside the Glyph View:
File → Import
Select:
project_retro.svgFontForge may display Import Parameters.
Options can include:
Correct Direction
Handle Erasers
Simplify Stroke
Use Clip-paths
Scale to fit
Infer glyph widthFor straightforward SVG artwork, the defaults are generally a reasonable starting point.
IMPORTANTIf Scale to fit causes the imported artwork to become extremely small, don't repeatedly re-import it. You can scale it manually afterward.
Scaling the artwork
Your imported SVG may initially appear tiny.
Select the imported artwork:
Ctrl + A
assuming it is now the only artwork in the glyph.
Open:
Element → Transformations → Transform
Set the origin to:
Center of Selection
Then select:
Scale
Keep X and Y equal.
For example:
X: 300%
Y: 300%or:
X: 400%
Y: 400%The actual value depends entirely on the SVG and font.
Keeping X and Y equal preserves the design's aspect ratio.
IMPORTANTDon't use something like:
X: 400%
Y: 250%unless you deliberately want to distort the logo.
Understand the vertical lines
In Glyph View you'll normally see vertical boundaries.
For example:
0 4880
│ │
│ │
│ PROJECT RETR0 │
│ │The left side is around:
X = 0and the right boundary may be:
X = 4880depending on the original glyph.
That right-hand value represents the glyph's advance width.
If you're replacing an existing game UI symbol, preserving its original advance width is often desirable because the game's layout may have been designed around it.
Your artwork should generally fit within those boundaries unless you intentionally want it to overhang.
IMPORTANTDon't make the artwork touch both boundaries exactly.
A little margin is preferable:
0 4880
│ │
│ [ PROJECT RETR0 ] │
│ │Understand the horizontal guides
You'll also see horizontal font metrics.
The most important for alignment is the:
Baseline
Ordinary letters sit on this line.
For something such as:
PROJECT RETR0the bottom of the normal lettering should generally sit around the baseline.
However, a logo may intentionally contain decorative elements extending below it.
For example:
PROJECT RETR0
█████████████
──────────────────────── ← baseline
│
───┼────────────
│Here, the text sits at the baseline while the decorative logo elements extend below it.
That's fine.
IMPORTANTDon't align the entire bounding box to the baseline if part of the design is intentionally supposed to extend underneath the lettering.
Position the logo
Use:
Element → Transformations → Transform → Move
to reposition the complete design.
For example:
X: +500
Y: +200would move it right and upward.
Move the whole logo together.
IMPORTANTDon't individually move the letters unless you're deliberately redesigning the logo.
Your goal should be:
LEFT BOUNDARY RIGHT BOUNDARY
│ │
│ [ COMPLETE LOGO ] │
│ │with reasonable margins.
Check the replacement glyph
Before generating the font, inspect your glyph.
Check that:
- The correct glyph was replaced
- The original encoding remains unchanged
- The artwork fits within the intended width
- Letter holes remain open
- The artwork isn't distorted
- The main text aligns correctly
- Decorative pieces aren't accidentally clipped
- Nothing unwanted from the original glyph remains
If everything looks correct, you're ready to generate the font.
Generate the modified TTF
Go back to FontForge's main font window.
Select:
File → Generate Fonts
FontForge offers many output formats.
You may see:
PS Type 1
PS Type 3
CFF
TrueType
TrueType (Symbol)
TrueType (MacBin)
OpenType
SVG font
WOFF
WOFF2For an ordinary .ttf replacement, select:
TrueType
IMPORTANTDo not select TrueType (Symbol) merely because your font contains graphical symbols. That's a specific encoding mode and isn't equivalent to "a TrueType font containing symbols."
Give your modified file a different filename initially:
r3_symbols_retro.ttfrather than immediately overwriting:
r3_symbols.ttfValidation warnings
Keep:
Validate Before Saving
enabled.
FontForge may report errors such as:
Self Intersecting
Wrong Direction
Missing Points at Extrema
Non-integral coordinatesIMPORTANTDon't immediately assume your new SVG caused all of them.
Older, unusual or game-specific fonts can already contain large numbers of validation warnings.
For example, if validation reports:
exclam
dollar
one
two
three
A
B
C
...when you only edited:
zerothen clearly those other warnings weren't created by your replacement artwork.
Pay particular attention to the glyph you actually modified.
If your modified glyph reports:
Self Intersecting
Wrong Directioninspect it before continuing, especially if the design contains holes.
If it only reports things such as:
Missing Points at Extrema
Non-integral coordinatesthose may be less serious depending on the font and target renderer.
Avoid automatically "fixing" every glyph in an existing game font. You could unintentionally alter hundreds of original glyphs.
Generate without overwriting the original
Save the result as:
r3_symbols_retro.ttfNow you have:
r3_symbols.ttf ← original
r3_symbols_retro.ttf ← modifiedReopen the new font in FontForge.
Find your modified glyph again and confirm that your replacement survived the TrueType generation correctly.
Only after you've verified it should you consider using it as a replacement.
If the game specifically requires:
r3_symbols.ttfmake a copy of your modified file and rename that copy.
Test it in the target application
The final test is the actual renderer.
Check:
- Does the new logo appear?
- Is it the expected size?
- Is it centred?
- Are any edges clipped?
- Are internal holes rendered correctly?
- Does surrounding UI still align properly?
- Do unrelated symbols still work?
Something can look perfect in FontForge but behave differently in the game's renderer because of scaling, font metrics or how the game positions that particular glyph.
If it's too small, return to FontForge and increase the glyph artwork.
If it's too large, scale it down.
If it's shifted, use Move rather than distorting the artwork.
Common problems
The SVG appears tiny in FontForge: Select the imported paths and use Transform → Scale with equal X/Y values.
IMPORTANTThe logo is enormous: Scale it down uniformly. Don't change the glyph width just to accommodate oversized artwork unless you know the game expects a different advance width.
The O/R/P holes disappeared: Check the original vector and contour directions. Bitmap tracing can close small openings, and breaking paths apart can change how compound shapes behave.
A giant rectangle appears behind the logo: The image background was traced. Remove the background contour before exporting the SVG.
IMPORTANTFontForge says hundreds of glyphs have errors: Check whether those errors were already present in the original font. Don't mass-modify the entire font just to fix warnings unrelated to your replacement.
Windows says the TTF is open in System: Close FontForge, Font Viewer and Explorer previews. Windows can keep fonts loaded or memory-mapped. Restarting Windows can release the font if necessary.
Recommended workflow
For people following the guide, I'd recommend this folder structure:
FontMod/
│
├── Original/
│ └── r3_symbols.ttf
│
├── Artwork/
│ ├── project_retro.png
│ └── project_retro.svg
│
├── Working/
│ └── r3_symbols.fontforge-work
│
└── Output/
└── r3_symbols_retro.ttfIMPORTANTNever use the only copy of the original font as your working file.
The full process is therefore:
Back up TTF → identify glyph → prepare artwork → vectorise/create paths in Inkscape → save Plain SVG → delete old glyph outlines → import SVG into the same glyph → scale → position → preserve encoding/metrics → generate TrueType → review warnings → test generated TTF → deploy a copy.
That gives other people a reproducible workflow rather than just a set of steps specific to one RETR0 logo.
Get support on Discord
Stuck with Inkscape, FontForge, tracing, SVG imports, glyph scaling, validation or testing? Join the Project RETR0 community and ask for help.
