Download this file
| 1 | #!/bin/sh |
| 2 | # Copies Base's faces into BaseKit's resources (P8): Timeless Sans, fetched |
| 3 | # by `make fonts` (git-ignored: its licence forbids committing it), and DM |
| 4 | # Sans, the committed OFL fallback the web uses too. Every build runs this |
| 5 | # first. Without Timeless Sans a dev build is set in DM Sans, as the web is; |
| 6 | # --release refuses to go on without the pinned file (hack/fonts.sh check). |
| 7 | set -eu |
| 8 | cd "$(dirname "$0")/../.." |
| 9 | fonts=native/apple/Sources/BaseKit/Resources/Fonts |
| 10 | timeless=internal/look/static/fonts/timeless/1.094/TimelessSansVF.woff2 |
| 11 | dmsans=internal/look/static/fonts/dm-sans/4.004/DMSans-VF.woff2 |
| 12 | if [ "${1:-}" = --release ]; then |
| 13 | hack/fonts.sh check |
| 14 | elif [ -n "${1:-}" ]; then |
| 15 | echo "usage: $0 [--release]" >&2; exit 2 |
| 16 | fi |
| 17 | mkdir -p "$fonts" |
| 18 | cp "$dmsans" "$fonts/DMSans-VF.woff2" |
| 19 | if [ -f "$timeless" ]; then |
| 20 | cp "$timeless" "$fonts/TimelessSansVF.woff2" |
| 21 | else |
| 22 | rm -f "$fonts/TimelessSansVF.woff2" |
| 23 | echo "fonts: no Timeless Sans (make fonts fetches it); this build is set in DM Sans" |
| 24 | fi |
| 25 | |