Skip to content

Instantly share code, notes, and snippets.

@haxibami
Last active March 10, 2024 15:16
Show Gist options
  • Save haxibami/814852b472a8bf33dc74e8aae663a277 to your computer and use it in GitHub Desktop.
Save haxibami/814852b472a8bf33dc74e8aae663a277 to your computer and use it in GitHub Desktop.
Appleのサイトから日本語向けのSan Franciscoフォント(`SF Pro JP`)をダウンロードするスクリプト

Appleのサイトから日本語向けのSan Franciscoフォント(SF Pro JP)をダウンロードするスクリプト

概要

使い方

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment