blob: 0e9cd9128f1ba3c42653e62378729d9aafe0fda8 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  | 
#!/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
  |