blob: 2aae83a10b309d17b2122a3a404262fee3c7ecb4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
#! /usr/bin/env bash
ff_filter() {
fontforge -c 'open(argv[1]).generate(argv[2])' "$1" "$2"
}
ttf_filter() {
# 1 - source file
# 2 - destination file
BNP=${BNP:="./BitsNPicas.jar"}
java -jar "$BNP" convertbitmap -f ttf -o "$2" "$1"
}
export_fonts() {
for i in src/*; do
local file_name
file_name=$(basename "${i%.*}")
ttf_filter "$i" "build/scientifica/ttf/$file_name.ttf"
ff_filter "$i" "build/scientifica/otb/$file_name.otb"
ff_filter "$i" "build/scientifica/bdf/$file_name.bdf"
done
}
main() {
rm -rf build
mkdir -p build/scientifica/{otb,ttf,bdf}
echo "[~] Exporting fonts ..."
export_fonts
echo "[~] Entering build directory ..."
cd build || echo "[!] Failed to enter build directory!"
tar c --file scientifica.tar scientifica
echo "[~] Leaving build directory ..."
echo "[!] Done!"
}
main
|