aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..2c7cc06
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,30 @@
1#! /usr/bin/env bash
2
3export BNP="BitsNPicas.jar"
4
5ff_filter() {
6 fontforge -c 'open(argv[1]).generate(argv[2])' "$1" "$2"
7}
8
9ttf_filter() {
10 # 1 - source file
11 # 2 - destination file
12 java -jar "$BNP" convertbitmap -f ttf -o "$2" "$1"
13}
14
15export_fonts() {
16 for i in src/*; do
17 local file_name=$(basename "${i%.*}")
18 ttf_filter "$i" "build/ttf/$file_name.ttf"
19 ff_filter "$i" "build/otb/$file_name.otb"
20 ff_filter "$i" "build/bdf/$file_name.bdf"
21 done
22}
23
24main() {
25 rm -rf build
26 mkdir -p build/{otb,ttf,bdf}
27 export_fonts
28}
29
30main