Skip to content

Commit 0eb8a96

Browse files
committed
[build-ttf.sh] transitioned Python build tool calls to use of pipenv virtual env with pinned versions
1 parent 74d359e commit 0eb8a96

File tree

1 file changed

+7
-26
lines changed

1 file changed

+7
-26
lines changed

build-ttf.sh

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ fi
2828
# Optional build dependency install request with syntax `./build.sh --install-dependencies`
2929
if [ "$1" = "--install-dependencies" ]
3030
then
31-
# fontmake
32-
pip install --upgrade fontmake
33-
# fontTools (installed with fontmake at this time. leave this as dependency check as python scripts for fixes require it should fontTools eliminate dep)
34-
pip install --upgrade fonttools
3531
# ttfautohint v1.6 (must be pinned to v1.6 and above for Hack instruction sets)
3632
tools/scripts/install/ttfautohint-build.sh
3733

@@ -40,22 +36,7 @@ fi
4036
# confirm executable installs and library imports for build dependencies
4137
INSTALLFLAG=0
4238

43-
echo "Confirming that build dependencies are installed..."
44-
echo " "
45-
# fontmake installed
46-
if ! which fontmake
47-
then
48-
echo "Unable to install fontmake with 'pip install fontmake'. Please attempt a manual install of this build dependency and then repeat your build attempt." 1>&2
49-
INSTALLFLAG=1
50-
fi
51-
# fontTools python library can be imported
52-
if ! python -c "import fontTools"
53-
then
54-
echo "Unable to install fontTools with 'pip install fonttools'. Please attempt a manual install of this build dependency and then repeat your build attempt." 1>&2
55-
INSTALLFLAG=1
56-
else
57-
echo "fontTools Python library identified"
58-
fi
39+
5940
# ttfautohint installed
6041
# - tests for install to local path from ttfautohint-build.sh script
6142
# - if not found on this path, tests for install on system PATH - if found, revises TTFAH to the string "ttfautohint" for execution of instruction sets
@@ -106,29 +87,29 @@ fi
10687

10788
# build regular set
10889

109-
if ! fontmake -u "source/Hack-Regular.ufo" -o ttf
90+
if ! pipenv run fontmake -u "source/Hack-Regular.ufo" -o ttf
11091
then
11192
echo "Unable to build the Hack-Regular variant set. Build canceled." 1>&2
11293
exit 1
11394
fi
11495

11596
# build bold set
116-
if ! fontmake -u "source/Hack-Bold.ufo" -o ttf
97+
if ! pipenv run fontmake -u "source/Hack-Bold.ufo" -o ttf
11798
then
11899
echo "Unable to build the Hack-Bold variant set. Build canceled." 1>&2
119100
exit 1
120101
fi
121102

122103
# build italic set
123-
if ! fontmake -u "source/Hack-Italic.ufo" -o ttf
104+
if ! pipenv run fontmake -u "source/Hack-Italic.ufo" -o ttf
124105
then
125106
echo "Unable to build the Hack-Italic variant set. Build canceled." 1>&2
126107
exit 1
127108
fi
128109

129110
# build bold italic set
130111

131-
if ! fontmake -u "source/Hack-BoldItalic.ufo" -o ttf
112+
if ! pipenv run fontmake -u "source/Hack-BoldItalic.ufo" -o ttf
132113
then
133114
echo "Unable to build the Hack-BoldItalic variant set. Build canceled." 1>&2
134115
exit 1
@@ -140,7 +121,7 @@ fi
140121
echo " "
141122
echo "Attempting DSIG table fixes with fontbakery..."
142123
echo " "
143-
if ! python postbuild_processing/fixes/fix-dsig.py master_ttf/*.ttf
124+
if ! pipenv run python postbuild_processing/fixes/fix-dsig.py master_ttf/*.ttf
144125
then
145126
echo "Unable to complete DSIG table fixes on the release files"
146127
exit 1
@@ -150,7 +131,7 @@ fi
150131
echo " "
151132
echo "Attempting fstype fixes with fontbakery..."
152133
echo " "
153-
if ! python postbuild_processing/fixes/fix-fstype.py master_ttf/*.ttf
134+
if ! pipenv run python postbuild_processing/fixes/fix-fstype.py master_ttf/*.ttf
154135
then
155136
echo "Unable to complete fstype fixes on the release files"
156137
exit 1

0 commit comments

Comments
 (0)