Skip to content

Commit b21149a

Browse files
committed
flick time 1
1 parent 0a25bd8 commit b21149a

82 files changed

Lines changed: 4729 additions & 265 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Generator Tools/build.sh

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,42 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
3-
python3 font.py
3+
4+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
5+
ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
6+
REPORT_PATH="$ROOT_DIR/fonts/build_report.json"
7+
8+
if ! command -v python3 >/dev/null 2>&1; then
9+
echo "Missing required dependency: python3" >&2
10+
exit 1
11+
fi
12+
13+
if ! python3 -c "import fontTools" >/dev/null 2>&1; then
14+
echo "Missing required dependency: fontTools. Install with 'pip install fonttools'." >&2
15+
exit 1
16+
fi
17+
18+
if ! command -v ttfautohint >/dev/null 2>&1; then
19+
echo "Warning: ttfautohint not found; build will continue without hinting unless installed." >&2
20+
fi
21+
22+
if ! command -v woff2_compress >/dev/null 2>&1; then
23+
echo "Warning: woff2_compress not found; build will continue without webfont compression." >&2
24+
fi
25+
26+
cd "$ROOT_DIR"
27+
python3 "Generator Tools/font.py" "$@"
28+
29+
if [[ -f "$REPORT_PATH" ]]; then
30+
python3 - "$REPORT_PATH" <<'PY'
31+
import json
32+
import sys
33+
34+
report_path = sys.argv[1]
35+
with open(report_path, encoding="utf-8") as handle:
36+
report = json.load(handle)
37+
38+
families = ", ".join(report.get("families", {}).keys()) or "none"
39+
version = report.get("version", "unknown")
40+
print(f"Build complete: version {version}; families: {families}")
41+
PY
42+
fi

0 commit comments

Comments
 (0)