| # Copyright (c) 2009-2017 The OTS Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| test "x$top_srcdir" = x && top_srcdir=. |
| test "x$top_builddir" = x && top_builddir=. |
| # Usage: ./test_bad_fonts.sh [ttf_or_otf_file_name] |
| BASE_DIR=$top_srcdir/tests/fonts/bad/ |
| CHECKER=$top_builddir/ots-sanitize$EXEEXT |
| if [ ! -x "$CHECKER" ] ; then |
| echo "$CHECKER is not found." |
| # No font file is specified. Apply this script to all TT/OT files under the |
| if [ ! -d $BASE_DIR ] ; then |
| echo "$BASE_DIR does not exist." |
| FONTS=$(find $BASE_DIR -type f) |
| # Recursively call this script. |
| echo "$FAILS fonts failed." |
| echo "Usage: $0 [ttf_or_otf_file_name]" |
| # Confirm that the bad font file is rejected by OTS. |