This will install Apple SF & NY fonts on Linux. Tested on Pop!OS (similar to Ubuntu) 20.10.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install Apple fonts on Linux | |
# requires p7zip-full installed | |
getFont() { | |
NAME=$1 | |
APPLENAME=$2 | |
DIR=$3 | |
DIR=${DIR:="/tmp"} | |
if [ ! -f "${DIR}/${NAME}.dmg" ];then | |
wget "https://devimages-cdn.apple.com/design/resources/download/${NAME}.dmg" -O "${DIR}/${NAME}.dmg" | |
fi | |
cd "${DIR}" | |
7z x -ao "${NAME}.dmg" | |
cd "${APPLENAME}" | |
7z x -ao *.pkg | |
7z x -ao Payload~ | |
cp Library/Fonts/*.otf Library/Fonts/*.ttf ~/.local/share/fonts | |
} | |
mkdir -p ~/.local/share/fonts | |
getFont SF-Pro SanFranciscoPro | |
getFont SF-Compact SanFranciscoCompact | |
getFont SF-Mono SFMonoFonts | |
getFont SF-Arabic SFArabicFonts | |
getFont NY NYFonts | |
fc-cache -f -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment