hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/tools/subset-ttf.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tools/subset-ttf.sh')
-rwxr-xr-xtools/subset-ttf.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/subset-ttf.sh b/tools/subset-ttf.sh
new file mode 100755
index 0000000..70cffa2
--- /dev/null
+++ b/tools/subset-ttf.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# trim the ttf into a subset (U+0020..007E), its just to embed fonts that are actually
+# rendered, since we have NERD fonts and shit, they can be quite large
+
+set -e
+IN="$1"
+OUT="$2"
+python3 -m fontTools.subset "$IN" \
+ --unicodes=U+0020-007E \
+ --no-hinting --glyph-names \
+ --output-file="$OUT"
+echo "wrote $OUT"