1.1 --- a/tools/install.sh Tue May 29 19:01:38 2018 +0200
1.2 +++ b/tools/install.sh Tue May 29 19:02:55 2018 +0200
1.3 @@ -56,7 +56,13 @@
1.4 # Generate binaries if appropriate.
1.5
1.6 if [ ! "$CLEAN" ] ; then
1.7 - "$THISDIR/makefonts.sh" -q
1.8 + if ! "$THISDIR/makefonts.sh" -q ; then
1.9 + cat 1>&2 <<EOF
1.10 +
1.11 +Install halted due to font generation problem.
1.12 +EOF
1.13 + exit 1
1.14 + fi
1.15 fi
1.16
1.17 # Copy (or remove) each of the objects.
2.1 --- a/tools/makefonts.sh Tue May 29 19:01:38 2018 +0200
2.2 +++ b/tools/makefonts.sh Tue May 29 19:02:55 2018 +0200
2.3 @@ -19,6 +19,12 @@
2.4 GNU Unifont is supported.
2.5
2.6 The optional -q argument indicates quiet execution, suppressing all output.
2.7 +
2.8 +This script assumes that Unifont is installed in the following location:
2.9 +
2.10 +$UNIFONT
2.11 +
2.12 +The UNIFONT variable should be adjusted if this is not the case.
2.13 EOF
2.14 exit 1
2.15 fi
2.16 @@ -58,5 +64,16 @@
2.17 if [ ! "$QUIET" ] ; then
2.18 echo "$FONTPATH"
2.19 fi
2.20 - "$THISDIR/readfont.py" "$UNIFONT" "$FONTPATH"
2.21 +
2.22 + if ! "$THISDIR/readfont.py" "$UNIFONT" "$FONTPATH" ; then
2.23 + cat 1>&2 <<EOF
2.24 +
2.25 +Font generation halted due to conversion problem. Please check the UNIFONT
2.26 +variable in this script, located here:
2.27 +
2.28 +$DIRNAME/$PROGNAME
2.29 +EOF
2.30 + exit 1
2.31 + fi
2.32 +
2.33 done
3.1 --- a/tools/readfont.py Tue May 29 19:01:38 2018 +0200
3.2 +++ b/tools/readfont.py Tue May 29 19:02:55 2018 +0200
3.3 @@ -20,7 +20,7 @@
3.4 with this program. If not, see <http://www.gnu.org/licenses/>.
3.5 """
3.6
3.7 -from os.path import split
3.8 +from os.path import isfile, split
3.9 import sys
3.10
3.11 def convert_font(fin, fout, points, missing=32):
3.12 @@ -233,6 +233,10 @@
3.13 # Convert from the input to the output file.
3.14
3.15 else:
3.16 + if not isfile(filename_or_option):
3.17 + print >>sys.stderr, "Font file not found:", filename_or_option
3.18 + sys.exit(1)
3.19 +
3.20 fin = open(filename_or_option)
3.21 fout = open(tff_filename, "w")
3.22 try: