From 7f73ee2d11ee09231acb7e7c0c9bcb957109ee92 Mon Sep 17 00:00:00 2001 From: Joe Fitzgerald Date: Mon, 8 Jun 2020 18:41:12 -0500 Subject: [PATCH] add CI to set the stage for running fontbakery (#38) - fontmake cannot be run yet, it errors (https://github.com/chrismsimpson/Metropolis/pull/35/commits/1b143bec257e5c2d37d760f4eb83db4219e88c75 seems to indicate that the following will fix the build issues: adding a Light[700] bracket layer for each of the glyphs that were causing fontmake builds to fail: the cent and the dollar on both the Regular and the Italic) - subsequent steps are commented out so that they can be enabled progressively in subsequent PRs --- .travis.yml | 8 ++++++++ Sources/build.sh | 35 +++++++++++++++++++++++++++++++++++ Sources/requirements.txt | 3 +++ 3 files changed, 46 insertions(+) create mode 100644 .travis.yml create mode 100755 Sources/build.sh create mode 100644 Sources/requirements.txt diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..50eae46 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: python + +install: + - pip install --upgrade pip + - pip install -r Sources/requirements.txt + +script: +- ./Sources/build.sh \ No newline at end of file diff --git a/Sources/build.sh b/Sources/build.sh new file mode 100755 index 0000000..1c8e1cf --- /dev/null +++ b/Sources/build.sh @@ -0,0 +1,35 @@ +#!/bin/bash +set -ex +DIR="$(dirname "${BASH_SOURCE[0]}")" +BASEDIR="$DIR/.." +cd "$BASEDIR" + OUTPUT_DIR="$BASEDIR/build_output" + SOURCE_DIR="$BASEDIR/Sources" + + rm -rf $OUTPUT_DIR + + # for src in $SOURCE_DIR/*.glyphs + # do + # fontmake -g $src -o ttf -i --output-dir $OUTPUT_DIR/ + # done + + # for font in $OUTPUT_DIR/*.ttf + # do + # gftools fix-nonhinting $font $font + # gftools fix-dsig $font --autofix + # done + + # Cleanup gftools mess: + # rm $OUTPUT_DIR/*-backup-fonttools-prep-gasp.ttf + + # cp METADATA.pb $OUTPUT_DIR + # cp DESCRIPTION.*.html $OUTPUT_DIR + + # export OPTIONS="--no-progress" + # export OPTIONS="$OPTIONS --exclude-checkid /check/ftxvalidator" # We lack this on Travis. + # export OPTIONS="$OPTIONS --exclude-checkid /check/metadata" # Comment this out after creating a METADATA.pb file. + # export OPTIONS="$OPTIONS --exclude-checkid /check/description" # Comment this out after creating a DESCRIPTION.en_us.html file. + # export OPTIONS="$OPTIONS --exclude-checkid /check/varfont" # Comment this out when making a variable font. + # export OPTIONS="$OPTIONS --loglevel INFO --ghmarkdown Fontbakery-check-results.md" + # fontbakery check-googlefonts $OPTIONS $OUTPUT_DIR/*.ttf +cd - \ No newline at end of file diff --git a/Sources/requirements.txt b/Sources/requirements.txt new file mode 100644 index 0000000..6991b60 --- /dev/null +++ b/Sources/requirements.txt @@ -0,0 +1,3 @@ +git+https://github.com/googlefonts/fontbakery +git+https://github.com/googlefonts/gftools +fontmake \ No newline at end of file