-
Notifications
You must be signed in to change notification settings - Fork 33
/
do_generate
executable file
·31 lines (26 loc) · 977 Bytes
/
do_generate
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
#!/usr/bin/env sh
#
# Create and rename one font style according to the specs
#
# Example invocation:
# do_generate 01 --powerline --mono CascadiaCodePL-Regular.ttf DelugiaPowerline.ttf Delugia Regular
#
# No parameters are checked, but they are:
# 1: Number of logfile
# 2: Conversion spec #1
# 3: Conversion spec #2
# 4: Input font file name
# 5: Output font file name
# 6: Font family name
set -e
if [ "$#" -ne 6 ]; then
exit 1
fi
PWD=$( pwd )
rm -f C*.ttf
fontforge -script "${PWD}/font-patcher" --debug 2 --careful "${3}" --custom SomeExtraSymbols.sfd --no-progressbars "${PWD}/ttf/static/${4}" "${2}" --outputdir "${PWD}" | tee "process${1}.log"
if [ -z "${OURVERSION}" ]; then
# Github CI sets this variable, but this can be useful for manual calls:
OURVERSION=`git describe --always --tags`
fi
fontforge -script "${PWD}/rename-font" --orig "${PWD}/ttf/static/${4}" --input ${PWD}/C*.ttf --output "${PWD}/${5}" --version "${OURVERSION}" --name "${6}"