#!/bin/bash source "site.defaults.conf" find "${ASSETS_DIR}fonts" \ -type f \ -name "*.ttf" \ | while read file do target_file=$(basename "${file%.ttf}.woff2") echo -e "\033[0;32m[MINIFY ]\033[0m $file -> $OUTPUT_DIR$target_file" pyftsubset "$file" \ --text-file="${ASSETS_DIR}fonts/glyphs.txt" \ --layout-features+=ss09,dlig \ --flavor="woff2" \ --output-file="$OUTPUT_DIR$target_file" done