diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build_fonts.sh | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/scripts/build_fonts.sh b/scripts/build_fonts.sh index 292cef2..9823fcf 100755 --- a/scripts/build_fonts.sh +++ b/scripts/build_fonts.sh | |||
@@ -6,18 +6,18 @@ if [ -f "site.conf" ]; then | |||
6 | source "site.conf" | 6 | source "site.conf" |
7 | fi | 7 | fi |
8 | 8 | ||
9 | echo -e "\033[0;32m[MINIFY ]\033[0m ${ASSETS_DIR}fonts/iosevka-term-ss09-regular.ttf -> ${OUTPUT_DIR}iosevka-term-ss09-regular.woff2" | 9 | find "${ASSETS_DIR}fonts" \ |
10 | -type f \ | ||
11 | -name "*.ttf" \ | ||
12 | | while read file | ||
13 | do | ||
14 | target_file=$(basename "${file%.ttf}.woff2") | ||
10 | 15 | ||
11 | pyftsubset ${ASSETS_DIR}fonts/iosevka-term-ss09-regular.ttf \ | 16 | echo -e "\033[0;32m[MINIFY ]\033[0m $file -> $OUTPUT_DIR$target_file" |
12 | --text-file="${ASSETS_DIR}fonts/glyphs.txt" \ | ||
13 | --layout-features+=ss09,dlig \ | ||
14 | --flavor="woff2" \ | ||
15 | --output-file="${OUTPUT_DIR}iosevka-term-ss09-regular.woff2" | ||
16 | 17 | ||
17 | echo -e "\033[0;32m[MINIFY ]\033[0m ${ASSETS_DIR}fonts/iosevka-term-ss09-bold.ttf -> ${OUTPUT_DIR}iosevka-term-ss09-bold.woff2" | 18 | pyftsubset "$file" \ |
18 | 19 | --text-file="${ASSETS_DIR}fonts/glyphs.txt" \ | |
19 | pyftsubset ${ASSETS_DIR}fonts/iosevka-term-ss09-bold.ttf \ | 20 | --layout-features+=ss09,dlig \ |
20 | --text-file="${ASSETS_DIR}fonts/glyphs.txt" \ | 21 | --flavor="woff2" \ |
21 | --layout-features+=ss09,dlig \ | 22 | --output-file="$OUTPUT_DIR$target_file" |
22 | --flavor="woff2" \ | 23 | done |
23 | --output-file="${OUTPUT_DIR}iosevka-term-ss09-bold.woff2" | ||