Compare commits

..

No commits in common. "5a6113df5f1807a483e524a031bc665158bf2993" and "d3df25bc758618bd76133fd7233ff46becfb0cef" have entirely different histories.

3 changed files with 2 additions and 44 deletions

View file

@ -1,12 +1,7 @@
ARGS ?= -c
OK_TYPES := otf ttf woff woff2
NF_SRC := $(shell find src -type f)
ML_TYPES := $(shell find ./MonoLisa \
-mindepth 1 \
-maxdepth 1 \
-not -empty \
-type d \
-exec basename {} \;)
ML_TYPES := $(shell find MonoLisa -mindepth 1 -type d -printf "%f ")
UNKNOWN := $(filter-out $(OK_TYPES),$(ML_TYPES))
$(if $(UNKNOWN),$(error unknown font type in ./MonoLisa: $(UNKNOWN)))
@ -14,22 +9,13 @@ $(if $(UNKNOWN),$(error unknown font type in ./MonoLisa: $(UNKNOWN)))
msg = $(call tprint,{a.bold}==>{a.end} {a.b_magenta}$(1){a.end} {a.bold}<=={a.end})
## patch | add nerd fonts to MonoLisa
ifdef DOCKER
.PHONY: patch
patch: $(foreach ml-type,$(ML_TYPES),patch-$(ml-type)-docker)
else
.PHONY: patch
patch: $(addprefix patch-,$(ML_TYPES))
endif
patch-%: ./bin/font-patcher
$(call msg, Patching MonoLisa $* Files)
@./bin/patch-monolisa $* $(ARGS)
patch-%-docker: ./bin/font-patcher
$(call msg, Patching Monolisa $* Files w/Docker)
@./bin/patch-monolisa-docker $* $(ARGS)
## update-fonts | move fonts and update fc-cache
.PHONY: update-fonts
update-fonts:

View file

@ -22,8 +22,6 @@ sudo pacman -S fontforge
You can also download the version for your system from the releases in the fontforge [repo](https://github.com/fontforge/fontforge).
If you prefer to use `docker` rather than install `fontforge` you can just add `DOCKER=1` to calls to `make patch`.
## Downloading MonoLisa
Once you have acquired MonoLisa, follow the link in your email to download it.
@ -47,6 +45,7 @@ you can easily apply the nerd font patches with `make`.
To patch all font types use the default `patch` rule.
```bash
make
```

View file

@ -1,27 +0,0 @@
#!/usr/bin/env bash
# set -e
# docker exits with code 1?
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"
docker run --rm -v "$(pwd)/MonoLisa/$ext:/in" -v "$(pwd)/patched/$ext:/out" nerdfonts/patcher $fp_args
exit 0