mirror of
https://github.com/daylinmorgan/monolisa-nerdfont-patch.git
synced 2024-11-12 18:03:14 -06:00
update README and add patch-monolisa
This commit is contained in:
parent
aad7120dac
commit
fed632bb91
2 changed files with 57 additions and 0 deletions
27
README.md
27
README.md
|
@ -1 +1,28 @@
|
|||
# MonoLisa NF
|
||||
|
||||
Batteries inlcuded repo to patch MonoLisa with Nerd Fonts glyphs
|
||||
|
||||
## Before You Begin
|
||||
|
||||
First you will need to install `fontforge`
|
||||
There are a number of caveats to invoking the `font-patcher` script.
|
||||
Some of which are explained by [nerd fonts](https://github.com/ryanoasis/nerd-fonts#font-patcher).
|
||||
|
||||
Using `patch-monolisa` assumes you have installed fontforge using your system dependency manager.
|
||||
On ubuntu: `sudo apt-get install fontforge`.
|
||||
|
||||
## Downloading MonoLisa
|
||||
|
||||
Once you have acquired MonoLisa, follow the link in your email to download it.
|
||||
Then extract the `.zip` into `MonoLisa/`.
|
||||
|
||||
## Patching your font
|
||||
|
||||
Once you have downloaded MonoLisa and `fontforge`
|
||||
you can easily apply the nerd font patches using the `patch-monolisa` script.
|
||||
The only required argument is the font file extension you want to patch.
|
||||
All remiaining supplied arguments are passed to the `font-patcher` script.
|
||||
|
||||
```bash
|
||||
./patch-monolisa otf -c -w
|
||||
```
|
30
patch-monolisa
Executable file
30
patch-monolisa
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
exts=(otf ttf woff woff2)
|
||||
ext=$1
|
||||
shift
|
||||
fp_args=$@
|
||||
|
||||
if [[ -z "$ext" ]];then
|
||||
echo "please provide an extension"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! " ${exts[@]} " =~ " ${ext} " ]]; then
|
||||
echo "$ext is not a valid extension"
|
||||
echo "Please choose one of the below:"
|
||||
printf '%s\n' "${exts[@]}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Patching all fonts with ext -> $ext"
|
||||
echo "Using the following arguments for font-patcher $fp_args"
|
||||
|
||||
|
||||
for fontfile in MonoLisa/$ext/*.$ext; do
|
||||
|
||||
fontforge -script font-patcher $fontfile -o patched/$ext $fp_args
|
||||
|
||||
done
|
||||
|
Loading…
Reference in a new issue