|
@@ -14,6 +14,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+TTFAH="$HOME/ttfautohint-build/local/bin/ttfautohint"
|
|
|
+
|
|
|
|
|
|
if [ $# -gt 1 ]
|
|
|
then
|
|
@@ -22,6 +29,7 @@ if [ $# -gt 1 ]
|
|
|
exit 1
|
|
|
fi
|
|
|
|
|
|
+
|
|
|
if [ "$1" = "--install-dependencies" ]
|
|
|
then
|
|
|
|
|
@@ -29,54 +37,47 @@ if [ "$1" = "--install-dependencies" ]
|
|
|
|
|
|
pip install --upgrade fonttools
|
|
|
|
|
|
-
|
|
|
- platformstr=$(uname)
|
|
|
- if [ "$platformstr" = "Darwin" ]; then
|
|
|
-
|
|
|
- if ! which homebrew
|
|
|
- then
|
|
|
- echo "Please manually install Homebrew (https://brew.sh/) before the execution of this script with the --install-dependencies flag on the OS X platform." 1>&2
|
|
|
- exit 1
|
|
|
- fi
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if ! brew install --upgrade ttfautohint
|
|
|
- then
|
|
|
- echo "Unable to install ttfautohint with Homebrew. Please attempt to install this dependency manually and repeat this script without the --install-dependencies flag." 1>&2
|
|
|
- exit 1
|
|
|
- fi
|
|
|
- else
|
|
|
-
|
|
|
- tools/scripts/install/ttfautohint-build.sh
|
|
|
- fi
|
|
|
-
|
|
|
-
|
|
|
- installflag=0
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ tools/scripts/install/ttfautohint-build.sh
|
|
|
+
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+INSTALLFLAG=0
|
|
|
+
|
|
|
+echo "Confirming that build dependencies are installed..."
|
|
|
+echo " "
|
|
|
+
|
|
|
+if ! which fontmake
|
|
|
+ then
|
|
|
+ echo "Unable to install fontmake with 'pip install fontmake'. Please attempt manual install and repeat build without the --install-dependencies flag." 1>&2
|
|
|
+ INSTALLFLAG=1
|
|
|
+fi
|
|
|
+
|
|
|
+if ! python -c "import fontTools"
|
|
|
+ then
|
|
|
+ echo "Unable to install fontTools with 'pip install fonttools'. Please attempt manual install and repeat build without the --install-dependencies flag." 1>&2
|
|
|
+ INSTALLFLAG=1
|
|
|
+else
|
|
|
+ echo "fontTools Python library identified"
|
|
|
+fi
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+if ! [ -f "$LOCAL_TTFAH" ]
|
|
|
+ then
|
|
|
+ if ! which ttfautohint
|
|
|
+ then
|
|
|
+ echo "Unable to install ttfautohint from source. Please attempt manual install and repeat build without the --install-dependencies flag." 1>&2
|
|
|
+ INSTALLFLAG=1
|
|
|
+ else
|
|
|
+ TTFAH="ttfautohint"
|
|
|
+ fi
|
|
|
+fi
|
|
|
+
|
|
|
+if [ $INSTALLFLAG -eq 1 ]
|
|
|
+ then
|
|
|
+ echo "Build canceled." 1>&2
|
|
|
+ exit 1
|
|
|
fi
|
|
|
|
|
|
|
|
@@ -168,7 +169,7 @@ echo " "
|
|
|
mkdir master_ttf/hinted
|
|
|
|
|
|
|
|
|
-if ! ttfautohint -l 6 -r 50 -x 10 -H 181 -D latn -f latn -w G -W -t -X "" -I -R "master_ttf/Hack-Regular.ttf" -m "postbuild_processing/tt-hinting/Hack-Regular-TA.txt" "master_ttf/Hack-Regular.ttf" "master_ttf/hinted/Hack-Regular.ttf"
|
|
|
+if ! "$TTFAH" -l 6 -r 50 -x 10 -H 181 -D latn -f latn -w G -W -t -X "" -I -R "master_ttf/Hack-Regular.ttf" -m "postbuild_processing/tt-hinting/Hack-Regular-TA.txt" "master_ttf/Hack-Regular.ttf" "master_ttf/hinted/Hack-Regular.ttf"
|
|
|
then
|
|
|
echo "Unable to execute ttfautohint on the Hack-Regular variant set. Build canceled." 1>&2
|
|
|
exit 1
|
|
@@ -176,7 +177,7 @@ fi
|
|
|
echo "master_ttf/Hack-Regular.ttf - successful hinting with ttfautohint"
|
|
|
|
|
|
|
|
|
-if ! ttfautohint -l 6 -r 50 -x 10 -H 260 -D latn -f latn -w G -W -t -X "" -I -R "master_ttf/Hack-Regular.ttf" -m "postbuild_processing/tt-hinting/Hack-Bold-TA.txt" "master_ttf/Hack-Bold.ttf" "master_ttf/hinted/Hack-Bold.ttf"
|
|
|
+if ! "$TTFAH" -l 6 -r 50 -x 10 -H 260 -D latn -f latn -w G -W -t -X "" -I -R "master_ttf/Hack-Regular.ttf" -m "postbuild_processing/tt-hinting/Hack-Bold-TA.txt" "master_ttf/Hack-Bold.ttf" "master_ttf/hinted/Hack-Bold.ttf"
|
|
|
then
|
|
|
echo "Unable to execute ttfautohint on the Hack-Bold variant set. Build canceled." 1>&2
|
|
|
exit 1
|
|
@@ -184,7 +185,7 @@ fi
|
|
|
echo "master_ttf/Hack-Bold.ttf - successful hinting with ttfautohint"
|
|
|
|
|
|
|
|
|
-if ! ttfautohint -l 6 -r 50 -x 10 -H 145 -D latn -f latn -w G -W -t -X "" -I -R "master_ttf/Hack-Regular.ttf" -m "postbuild_processing/tt-hinting/Hack-Italic-TA.txt" "master_ttf/Hack-Italic.ttf" "master_ttf/hinted/Hack-Italic.ttf"
|
|
|
+if ! "$TTFAH" -l 6 -r 50 -x 10 -H 145 -D latn -f latn -w G -W -t -X "" -I -R "master_ttf/Hack-Regular.ttf" -m "postbuild_processing/tt-hinting/Hack-Italic-TA.txt" "master_ttf/Hack-Italic.ttf" "master_ttf/hinted/Hack-Italic.ttf"
|
|
|
then
|
|
|
echo "Unable to execute ttfautohint on the Hack-Italic variant set. Build canceled." 1>&2
|
|
|
exit 1
|
|
@@ -192,7 +193,7 @@ fi
|
|
|
echo "master_ttf/Hack-Italic.ttf - successful hinting with ttfautohint"
|
|
|
|
|
|
|
|
|
-if ! ttfautohint -l 6 -r 50 -x 10 -H 265 -D latn -f latn -w G -W -t -X "" -I -R "master_ttf/Hack-Regular.ttf" -m "postbuild_processing/tt-hinting/Hack-BoldItalic-TA.txt" "master_ttf/Hack-BoldItalic.ttf" "master_ttf/hinted/Hack-BoldItalic.ttf"
|
|
|
+if ! "$TTFAH" -l 6 -r 50 -x 10 -H 265 -D latn -f latn -w G -W -t -X "" -I -R "master_ttf/Hack-Regular.ttf" -m "postbuild_processing/tt-hinting/Hack-BoldItalic-TA.txt" "master_ttf/Hack-BoldItalic.ttf" "master_ttf/hinted/Hack-BoldItalic.ttf"
|
|
|
then
|
|
|
echo "Unable to execute ttfautohint on the Hack-BoldItalic variant set. Build canceled." 1>&2
|
|
|
exit 1
|