docs: Improve self-patching instructions

[why]
A lot of issues arise here. Running through fontforge instead of direct
seems to be more compatibe across setups.

Fixes: #284

Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
This commit is contained in:
Fini Jastrow 2023-02-04 11:47:38 +01:00
parent 32f1a0ad6b
commit d083aa6540

View file

@ -339,36 +339,32 @@ See: [Font Patcher](#font-patcher) for usage
<img src="images/nerd-fonts-patcher-logo.png" alt="Nerd Fonts Patcher"> <img src="images/nerd-fonts-patcher-logo.png" alt="Nerd Fonts Patcher">
</h2> </h2>
Patching the font of your own choosing for use with the [VimDevIcons ➶][vim-devicons]: Patching the font of your own choosing:
* requires: Python 2 (or Python 3), `python-fontforge` package (version `20141231` or later, see * Use the script
the [install instructions](http://designwithfontforge.com/en-US/Installing_Fontforge.html)) * Download script and its helper files as [archive](https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FontPatcher.zip) and extract
* alternative install method on OSX: `brew install fontforge` * Just downloading the `font-patcher` script is not enough.
* alternative method on Linux: Using the [AppImage](https://github.com/fontforge/fontforge/releases) * Requires: Fontforge, Python 3, `python-fontforge` and `argparse` packages
* alternative method using Docker: [Docker Hub](https://hub.docker.com/r/nerdfonts/patcher) * Fontforge can be installed as package
* Usage: * or on OSX via `brew install fontforge`
* or as [AppImage](https://github.com/fontforge/fontforge/releases)
``` * Usage, recommended:
./font-patcher PATH_TO_FONT
```
* Alternative usage: Execute the patcher with the FontForge binary using the script flag:
``` ```
fontforge -script font-patcher PATH_TO_FONT fontforge -script font-patcher PATH_TO_FONT
``` ```
* Usage, direct (more convenient call, if it works for you):
```
./font-patcher PATH_TO_FONT
```
* Usage, with Fontforge AppImage
* Patching fonts using the AppImage: _Note_: `chmod u+x` the AppImage after download. All supplied paths need to be **absolute** and an explicit output path is required! If everything is located in the same directory, you can use the `$PWD` shorthand.
_Note_: `chmod u+x` the AppImage after download. All supplied paths need to be **absolute** and an explicit output path is required! If everything is located in the same directory, you can use the `$PWD` shorthand.
``` ```
./FontForge.AppImage -script $PWD/font-patcher $PWD/BaseFont.ttf -out /tmp ./FontForge.AppImage -script $PWD/font-patcher $PWD/BaseFont.ttf -out /tmp
``` ```
* Patching fonts with Docker:
* Use docker
``` ```
docker run -v /path/to/fonts:/in -v /path/for/output:/out nerdfonts/patcher [OPTIONS] docker run --rm -v /path/to/fonts:/in -v /path/for/output:/out nerdfonts/patcher [OPTIONS]
``` ```
Full options: Full options:
@ -484,6 +480,12 @@ docker run --rm -v ~/Desktop/myfont/patchme:/in -v ~/Desktop/myfont/patched:/out
./gotta-patch-em-all-font-patcher\!.sh Hermit ./gotta-patch-em-all-font-patcher\!.sh Hermit
``` ```
* or to specific directory name start:
```
./gotta-patch-em-all-font-patcher\!.sh /Heavy
```
## Contributing ## Contributing
See [contributing.md](contributing.md) See [contributing.md](contributing.md)