Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(install): Add PowerShell Web Installer #1701

Merged
merged 3 commits into from
Sep 5, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 69 additions & 18 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ The following flow diagram shows the current glyph sets included:
* [**2 - Homebrew Fonts (macOS (OS X))**](#option-2-homebrew-fonts)
* [**3 - Chocolatey or Scoop (Windows)**](#option-3-unofficial-chocolatey-or-scoop-repositories)
* [**4 - Arch Linux Repository (Extra, AUR)**](#option-4-arch-extra-repository)
* [**5 - Ad Hoc Curl Download**](#option-5-ad-hoc-curl-download)
* [**6 - Install Script**](#option-6-install-script)
* [**7 - Clone Repo**](#option-7-clone-the-repo)
* [**8 - Patch Your Own Font**](#option-8-patch-your-own-font)
* [**5 - PowerShell Web Installer (Multi-Platform)**](#option-5-powershell-web-installer)
* [**6 - Ad Hoc Curl Download**](#option-6-ad-hoc-curl-download)
* [**7 - Install Script**](#option-7-install-script)
* [**8 - Clone Repo**](#option-8-clone-the-repo)
* [**9 - Patch Your Own Font**](#option-9-patch-your-own-font)

[**Features**](#features)
* [**Glyph/Icon sets**](#glyph-sets)
Expand Down Expand Up @@ -78,10 +79,11 @@ _If you..._
* `Option 2.` are on **macOS** and want to use **Homebrew** see [Homebrew Fonts](#option-2-homebrew-fonts)
* `Option 3.` are on **Windows** and want to use **Chocolatey** or **Scoop** see [Unofficial Chocolatey or Scoop Repositories](#option-3-unofficial-chocolatey-or-scoop-repositories)
* `Option 4.` are on **Arch Linux** and want to use **Extra packages** see [Arch Extra Repositories](#option-4-arch-extra-repository)
* `Option 5.` want to use the **`curl` command** or use in **scripts** see [Ad Hoc Curl Download](#option-5-ad-hoc-curl-download)
* `Option 6.` want to **automate** installing or use in **scripts** see the [Install Script](#option-6-install-script)
* `Option 7.` want **complete control** then see [cloning the repo](#option-7-clone-the-repo)
* `Option 8.` want to patch your own font see the [Font Patcher](#option-8-patch-your-own-font)
* `Option 5.` are using **PowerShell** and want an **interactive setup** or **use in scripts** see the [PowerShell Web Installer](#option-5-powershell-web-installer)
* `Option 6.` want to use the **`curl` command** or use in **scripts** see [Ad Hoc Curl Download](#option-6-ad-hoc-curl-download)
* `Option 7.` want to **automate** installing or use in **scripts** see the [Install Script](#option-7-install-script)
* `Option 8.` want **complete control** then see [cloning the repo](#option-8-clone-the-repo)
* `Option 9.` want to patch your own font see the [Font Patcher](#option-9-patch-your-own-font)

## Features
* A [FontForge Python script](#font-patcher) to patch any font
Expand Down Expand Up @@ -244,7 +246,55 @@ scoop install Hack-NF
Most fonts are available via [Arch Extra packages](https://archlinux.org/groups/any/nerd-fonts/).
Some special packages are [in AUR](https://aur.archlinux.org/packages?K=nerd-fonts-&outdated=off).

### `Option 5: Ad Hoc Curl Download`
### `Option 5: PowerShell Web Installer`

> Best option for **interactive setup guidance** or **automating** installations through **PowerShell scripts**.

_Note_:
- **Requires PowerShell 7+** to be installed on either Windows, macOS, or Linux.
- **Windows PowerShell 5.1** works okay too.
jpawlowski marked this conversation as resolved.
Show resolved Hide resolved

#### Run the Interactive Installer

```powershell
& ([scriptblock]::Create((iwr 'https://bit.ly/ps-nerdfont-installer')))
```

#### Install Fonts by Name

```powershell
& ([scriptblock]::Create((iwr 'https://bit.ly/ps-nerdfont-installer'))) -Name hack, heavy-data
```

#### Install Fonts Unattended

```powershell
& ([scriptblock]::Create((iwr 'https://bit.ly/ps-nerdfont-installer'))) -Name hack, heavy-data -Confirm:$false
```

#### List or Search Font Names

```powershell
& ([scriptblock]::Create((iwr 'https://bit.ly/ps-nerdfont-installer'))) -List All
& ([scriptblock]::Create((iwr 'https://bit.ly/ps-nerdfont-installer'))) -List hack
& ([scriptblock]::Create((iwr 'https://bit.ly/ps-nerdfont-installer'))) -List cas*
```

#### Get Help with Enhanced Parameter Options

```powershell
& ([scriptblock]::Create((iwr 'https://bit.ly/ps-nerdfont-installer'))) -Help ?
```

#### Install from PowerShell Gallery for Local Use

The Nerd Font Web Installer can also be installed locally from the [PowerShell Gallery](https://www.powershellgallery.com/packages/Invoke-NerdFontInstaller) as a trusted source:

```powershell
Install-PSResource Invoke-NerdFontInstaller
```

### `Option 6: Ad Hoc Curl Download`

> Option if you want to use the **`curl` command** or for use in **scripts**.

Expand All @@ -265,12 +315,13 @@ _Note:_ deprecated alternative paths: `~/.fonts`
cd ~/Library/Fonts && curl -fLO https://github.com/ryanoasis/nerd-fonts/raw/HEAD/patched-fonts/DroidSansMono/DroidSansMNerdFont-Regular.otf
```

### `Option 6: Install Script`
### `Option 7: Install Script`

> Best option if you want to **automate** installing or for use in **scripts**.

_Note_: **Requires (shallow) cloning** the repo as of now :-(
_Note_: Will not work to get newer fonts as they are not inside the repo anymore.
_Note_:
- **Requires (shallow) cloning** the repo as of now :-(
- Will not work to get newer fonts as they are not inside the repo anymore.

#### All fonts:

Expand All @@ -280,9 +331,9 @@ _Note_: Will not work to get newer fonts as they are not inside the repo anymore
./install.sh
```

or, in Powershell (Windows only):
or, in PowerShell (Windows only):

```pwsh
```powershell
./install.ps1
```

Expand All @@ -296,17 +347,17 @@ or, in Powershell (Windows only):
./install.sh HeavyData
```

or, in Powershell (Windows only):
or, in PowerShell (Windows only):

```pwsh
```powershell
./install.ps1 <FontName>
./install.ps1 Hack
./install.ps1 HeavyData
./install.ps1 FiraCode, Hack
./install.ps1 DejaVuSansMono -WhatIf
```

### `Option 7: Clone the Repo`
### `Option 8: Clone the Repo`

> Best option for **full control**, **all** or **some** of the fonts, or **contributing** to development.

Expand All @@ -333,7 +384,7 @@ cd nerd-fonts
git sparse-checkout add patched-fonts/JetBrainsMono
```

### `Option 8: Patch Your Own Font`
### `Option 9: Patch Your Own Font`

> The option for **patching** your **own font** or fully **customizing** the patched font.

Expand Down