SF Pro JPについては他記事を参照のことUser-AgentとRefererなしで普通にダウンロードしようとしても拒否される
curl https://gist.githubusercontent.com/haxibami/814852b472a8bf33dc74e8aae663a277/raw/e218429d603f533944e401458bd3361149fe3e1b/download.sh | shカレントディレクトリにフォントファイルがダウンロードされる
SF Pro JP については他記事を参照のこと
User-Agent と Referer なしで普通にダウンロードしようとしても拒否されるcurl https://gist.githubusercontent.com/haxibami/814852b472a8bf33dc74e8aae663a277/raw/e218429d603f533944e401458bd3361149fe3e1b/download.sh | shカレントディレクトリにフォントファイルがダウンロードされる
| #!/usr/bin/env sh | |
| # If UA (and referer) is not set, the website denies access | |
| USER_AGENT="User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0" | |
| for variant in "thin" "ultralight" "light" "regular" "medium" "semibold" "bold" "heavy" "black"; do | |
| curl -O -H "${USER_AGENT}" -H "Referer: https://www.apple.com/wss" https://www.apple.com/wss/fonts/SF-Pro-JP/v1/SFProJP_${variant}.ttf | |
| done |