Last active
September 2, 2022 07:14
-
-
Save erikarvstedt/8e1191f69db906b4cef95ab2bb7d466d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
read -rd '' script <<'EOF' || : | |
import sys | |
from fontTools import ttLib | |
path = sys.argv[1] | |
font = ttLib.TTFont(path) | |
del font['trak'] | |
font.save(sys.stdout.buffer) | |
EOF | |
# as of 2022-09-02 | |
nixos_unstable=2da64a81275b68fdad38af669afeda43d401e94b | |
drv=$(nix eval --raw nixpkgs/$nixos_unstable#python3 --apply ' | |
py: (py.withPackages (ps: with ps; [ fonttools ])).drvPath | |
') | |
nix shell $drv -c python <(echo "$script") myfont.otf > myfont-notrak.otf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment