Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jaykul/windowsconsolefonts
A module for working with Console fonts in Windows
https://github.com/jaykul/windowsconsolefonts
fonts powershell powershell-module windows
Last synced: 10 days ago
JSON representation
A module for working with Console fonts in Windows
- Host: GitHub
- URL: https://github.com/jaykul/windowsconsolefonts
- Owner: Jaykul
- License: mit
- Created: 2018-10-29T06:41:29.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-30T04:13:08.000Z (over 1 year ago)
- Last Synced: 2024-08-03T22:17:03.396Z (3 months ago)
- Topics: fonts, powershell, powershell-module, windows
- Language: C#
- Size: 988 KB
- Stars: 13
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Windows Console Fonts module
Lets you install fonts temporarily for use, and configure the current console font. You can also list available (monospaced) fonts.
**NOTE:** This is for the legacy Windows Console Host (conhost.exe). See also my [EzTheme](/jaykul/EzTheme) module `Theme.WindowsConsole` for controlling the colors.
## To Install the Module
```PowerShell
Install-Module WindowsConsoleFonts
```You can then `Import-Module WindowsConsoleFonts` and `Get-Command -Module WindowsConsoleFonts` and there are examples in `Get-Help -Examples ` ... for each command.
## To Register Fonts for Use
```PowerShell
Add-Font .\FuraCode.ttf
````Add-Font` allows non-administrator users to install fonts temporarily. This lasts until the user logs out or reboots.
To have the font stay installed even after restarting the system, the font must be copied to `${Env:windir}\fonts` **and** listed in the registry in `HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts` -- which requires elevation.## To Set the Font
```PowerShell
Set-ConsoleFont FiraCode -Size 18
````Set-ConsoleFont` automatically supports partial matches, so you can say "Lucida" for "Lucida Console" or "Fira" for "FiraCode Nerd Font Mono" etc. Because of this, it has a `-Passthru` parameter so you can see which font it selected.
## Problems:
`Add-Font` doesn't make the font show up in `Get-ConsoleFont` (or Tab completion) until you open a new window. You can use it in `Set-ConsoleFont`, but only if you know the name...