Skip to content

FontRegister is a small Windows utility to install fonts and/or repair the font registry via commandline.

License

Notifications You must be signed in to change notification settings

Nucs/FontRegister

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FontRegister

Nuget downloads NuGet GitHub license

FontRegister is both a command-line tool and a csharp native library (pure code) for installing and uninstalling fonts on Windows.

Key Features

  • Ability to install fonts in bulk.
  • Notify Windows OS about new fonts refreshing the font-lists on other apps immediately (photoshop, word and so on).
  • Written in pure C# and Pinvoke.
  • Code install/uninstall API via Nuget supporting .NET 4.8 and .NET 6.0.

Supported Font Types

  • ttf
  • otf
  • fon
  • ttc

Usage

# Will print help
fontregister

# Register fonts in the following folders or specific files:
# Note: Folders are deep-searched recursively.
fontregister install "c:/folder" "c:/font.ttf" "./relativedir/" "./relativedir/font.otf"

Help

Here's the output of the help command:

Usage: FontManager <command> [paths...]
Commands:
  install <path1> [path2] [path3] ... : Install fonts from specified files or directories
  uninstall <fontName1> [fontName2] [fontName3] ... : Uninstall specified fonts

FontRegister Library Code Example

PM> Install-Package FontRegister
//single file
var notifier = new WindowsFontInstaller(new WindowsSystemNotifier()); //pass null to not notify other apps
notifier.InstallFont("C:/myfonts/myfont.ttf");

//in bulk
var fontManager = new FontManager(notifier);
fontManager.InstallFonts(new string[] { "C:/myfonts", "C:/myfonts2/myfont.ttf" });

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgements

  • FontReg for the underlying functionality.
  • All contributors and users for their support.

About

FontRegister is a small Windows utility to install fonts and/or repair the font registry via commandline.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages