Skip to content

Commit ed569aa

Browse files
Document variant installs and cache behavior
1 parent 1572b9a commit ed569aa

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ To download the font from the NerdFonts repository and install it on the system,
3737
Install-NerdFont -Name 'FiraCode' -Scope AllUsers #Tab completion works on Scope too
3838
```
3939

40+
To install only a specific variant from the archive, use the `-Variant` parameter. `Mono` is useful for terminal and editor setups where you only want the monospace family.
41+
42+
```powershell
43+
Install-NerdFont -Name 'FiraCode' -Variant Mono
44+
```
45+
4046
### Install all NerdFonts
4147

4248
To install all NerdFonts on the system you can use the following command.
@@ -54,6 +60,12 @@ This requires the shell to run in an elevated context (sudo or run as administra
5460
Install-NerdFont -All -Scope AllUsers
5561
```
5662

63+
You can combine `-All` with `-Variant` to limit what gets installed from each archive:
64+
65+
```powershell
66+
Install-NerdFont -All -Variant Mono
67+
```
68+
5769
### Check if a NerdFont is installed
5870

5971
The [Fonts](https://psmodule.io/Fonts) module is installed automatically as a dependency and provides the
@@ -73,6 +85,8 @@ Get-Font -Name 'FiraCode*' -Scope AllUsers
7385

7486
If the command returns results, the font is installed. If it returns nothing, the font is not installed in that scope.
7587

88+
When you run `Install-NerdFont` again without `-Force`, fonts that are already installed in the requested scope are skipped. Downloaded archives are also cached per Nerd Fonts release so retries and repeated installs do not need to fetch the same zip again.
89+
7690
### Update an installed NerdFont
7791

7892
Individual font files do not embed a NerdFonts release version, so there is no direct way to check whether an installed
@@ -89,7 +103,7 @@ Install-NerdFont -Name 'FiraCode' -Force -Scope AllUsers
89103
```
90104

91105
This re-downloads and installs the font version bundled with your installed NerdFonts module, overwriting any existing
92-
files. To pick up newer font releases, update the NerdFonts module first (`Update-PSResource -Name NerdFonts` if you
106+
files. `-Force` also bypasses the local archive cache so the font zip is fetched again before reinstalling. To pick up newer font releases, update the NerdFonts module first (`Update-PSResource -Name NerdFonts` if you
93107
installed via PSResourceGet, or `Update-Module -Name NerdFonts` if you installed via PowerShellGet).
94108

95109
### Uninstall a NerdFont

0 commit comments

Comments
 (0)