summaryrefslogtreecommitdiff
path: root/fconv
blob: bd1eeea1371e4ca2ee9dd8c7e7b8e12c7c76badb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

chk_command() {
	if ! command -v "$1" > /dev/null; then
		>&2 echo "error: command '$1' could not be found"
		exit 1
	fi
}

chk_command "fontforge"

usage() {
	printf "usage: fconv FONT_SRC FONT_DST\n"
}

if [ "$#" -ne 2 ]; then
	usage
	exit 1
fi

fontforge -lang=ff -c 'Open($1); Generate($1:r + "." + $2); Close();' "$1" "$2"