Windows CLI for font install, uninstall, list, and cache cleanup. Written in C++17.
Made by FontLab https://www.fontlab.com/
Installing a font on Windows requires three steps:
-
Copy the file into a Fonts directory the OS watches:
- System scope (default when running as Administrator):
C:\Windows\Fonts\— visible to all users; requires Administrator privileges. - User scope (Windows 10 version 1809 and later):
%LOCALAPPDATA%\Microsoft\Windows\Fonts\— visible to the current user only; no admin needed.
- System scope (default when running as Administrator):
-
Write a registry entry so the font survives reboots:
- System scope:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts - User scope: same path under
HKEY_CURRENT_USER - The value name follows the convention
"Family Name (TrueType)"and the value data is the font file path. Without this entry the font disappears after the next reboot.
- System scope:
-
Notify GDI via
AddFontResourceW+WM_FONTCHANGEbroadcast so running applications (Word, browsers, design tools) see the new font immediately without restarting.
Uninstalling reverses those steps. fontlift also broadcasts WM_FONTCHANGE
after removal so running apps refresh their font lists.
Font names explained:
- Internal name / PostScript name — the stable identifier applications use
programmatically, e.g.
Arial-BoldMT. This is what-nmatches. - Family name — the group name shown in font menus, e.g.
Arial.
Supported formats: .ttf (TrueType), .otf (OpenType), .ttc/.otc
(collections with multiple faces per file). .woff/.woff2 are web-only and
not supported as installed system fonts by GDI.
- Download
fontlift-win-v*.zipfrom Releases - Extract and add the directory to your
PATH
git clone https://github.com/fontlaborg/fontlift-win-cli.git
cd fontlift-win-cli
build.cmdRequires Visual Studio Build Tools with the Windows SDK (Advapi32, Shlwapi, User32, Gdi32).
rem Install a font (user scope — no admin needed on Windows 10 1809+)
fontlift-win install myfont.ttf
rem Install system-wide (requires running as Administrator)
fontlift-win install myfont.ttf --admin
rem List all installed fonts (paths, sorted and deduped)
fontlift-win list
rem List PostScript/internal names
fontlift-win list -n
rem List both path and name
fontlift-win list -n -p
rem Uninstall (keep the file)
fontlift-win uninstall myfont.ttf
fontlift-win u -n "Font Name"
rem Remove (uninstall + delete the file)
fontlift-win remove myfont.ttf
fontlift-win rm -n "Font Name"
rem Clean up stale registrations and caches
fontlift-win cleanup
fontlift-win cleanup --admin rem include system font caches (requires admin)fontlift-win list rem paths (default, sorted, duplicate paths removed)
fontlift-win list -n rem internal/PostScript names
fontlift-win list -n -p rem name and path, sorted
fontlift-win list -s rem accepted for compatibility; output is always sortedfontlift-win install myfont.ttf
fontlift-win i -p C:\Downloads\font.otf
fontlift-win i myfont.ttf --admin rem force system scope (requires admin)
fontlift-win i myfont.ttf -a rem sameScope selection:
- Running as Administrator with
--admin: copies toC:\Windows\Fonts\+ writesHKLMregistry entry. - Running without admin: copies to
%LOCALAPPDATA%\Microsoft\Windows\Fonts\+ writesHKCUregistry entry. (Windows 10 1809+ only.) - If a font with the same family name is already installed, it is removed first.
fontlift-win uninstall myfont.ttf
fontlift-win u -n "Font Name"
fontlift-win u -n "Font Name" --admin rem also search system registryRemoves the GDI registration and registry entry. The file stays on disk.
Searches both user and system registries. Removes every matching entry the
process has permission for. If a system-scope copy remains, rerun elevated
with --admin.
fontlift-win remove myfont.ttf
fontlift-win rm -n "Font Name"
fontlift-win rm -n "Font Name" --adminUnregisters the font and permanently deletes the file. There is no undo.
fontlift-win cleanup rem registry prune + user/app caches
fontlift-win cleanup --admin rem also clear system font cachesCleanup does two things:
- Prune registry: removes entries pointing to font files that no longer exist. Cleans up both user and system registry keys (system requires admin).
- Clear caches: deletes user-level font caches and Adobe
AdobeFnt*.lstmanifest files. With--admin, also stops the Windows Font Cache Service (FontCache), deletes its binary cache files andFNTCACHE.DAT, then restarts the service. This resolves rendering glitches after fonts are added or removed. A reboot may still be required for some applications.
| Flag | Short | Description |
|---|---|---|
--admin |
-a |
Include system-scope operations (requires Administrator) |
--path PATH |
-p PATH |
Specify font by file path |
--name NAME |
-n NAME |
Specify font by internal/PostScript name |
| (sort flag) | -s |
Sort output — accepted but output is always sorted |
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Error |
2 |
Permission denied (need Administrator for system fonts) |
Access denied for system fonts (exit code 2)
Open Command Prompt as Administrator, then rerun the command.
Per-user fonts (%LOCALAPPDATA%\Microsoft\Windows\Fonts\) never need elevation.
Font installed but not visible in apps
Run fontlift-win cleanup to clear stale caches. Some applications (especially
older Win32 apps) only reload fonts on restart.
Font already installed
Uninstall the existing copy first: fontlift-win u -n "Exact Name".
Run fontlift-win list -n to find the exact name.
Invalid font file
Verify the format (.ttf, .otf, .ttc, .otc) and that the file is not corrupted.
.woff and .woff2 are web-only formats and cannot be installed as system fonts.
Font cache corruption / rendering glitches
Run fontlift-win cleanup --admin as Administrator to purge all font caches
and broken registry entries. A reboot is recommended after system cache cleanup.
- C++17, Windows 7+
- Dependencies: Windows SDK only (Advapi32, Shlwapi, User32, Gdi32)
- Binary size: ~100 KB
- Source: under 1000 lines
See DEPENDENCIES.md for details.
build.cmd rem build executable
publish.cmd rem create distribution archiveCopyright 2025 by Fontlab Ltd. Licensed under Apache License 2.0 — see LICENSE
- Repository: https://github.com/fontlaborg/fontlift-win-cli
- Changelog: CHANGELOG.md