#+TITLE: Font Forge Scripts
#+AUTHOR: Daniel Ziltener

* Direnv File

#+begin_src fundamental :eval no :tangle .envrc
use guix python python-wrapper fontforge curl unzip
#+end_src

* Nerd Font Patching

As preparation, we need the font patcher:

#+begin_src bash :results none :shebang #!/usr/bin/env bash
  tmp=$(mktemp)
  trap "rm -rf '$tmp'" exit
  curl -L https://github.com/ryanoasis/nerd-fonts/releases/latest/download/FontPatcher.zip > $tmp
  unzip $tmp
#+end_src

** Patching Libertinus

#+begin_src bash :results none :shebang #!/usr/bin/env bash
  curl -L https://github.com/alerque/libertinus/releases/download/v7.040/Libertinus-7.040.tar.xz | tar xJ
  ln -sf Libertinus-7.040/static/OTF/* .
  find . -name 'LibertinusSerif*.otf' -print0 | xargs -0 -IX -- direnv exec $PWD/font-patcher X -c --variable-width-glyphs --no-progressbars
#+end_src