Created
July 9, 2024 02:29
-
-
Save eAntillon/ec5b40f4fc1da8022bdc3b273d4d0147 to your computer and use it in GitHub Desktop.
Install all the variants of Iosevka font
This file contains hidden or 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 | |
| # VARIANTS_TO_INSTALL=(SS01 SS02 SS03 SS04 SS05 SS06 SS07 SS08 SS09 SS10 SS11 SS12 SS13 SS14 SS15 SS16 SS17 SS18) | |
| VARIANTS_TO_INSTALL=(SS01 SS02 SS03 SS04 SS05 SS06 SS07 SS08 SS09 SS10 SS11 SS12 SS13 SS14 SS15 SS16 SS17 SS18) | |
| # WEIGHTS_TO_INSTALL=(Thin ExtraLight Light Regular Medium SemiBold Bold ExtraBold Black) | |
| WEIGHTS_TO_INSTALL=(Regular Bold Italic BoldItalic) | |
| RELEASE=30.3.2 | |
| temp_dir=$(mktemp -d) | |
| cd $temp_dir | |
| if [ ! -d ~/.fonts ]; then | |
| mkdir ~/.fonts | |
| fi | |
| for VARIANT in ${VARIANTS_TO_INSTALL[@]}; do | |
| name="PkgTTF-Iosevka$VARIANT-$RELEASE" | |
| echo "Installing $name" | |
| echo " https://github.com/be5invis/Iosevka/releases/download/v$RELEASE/PkgTTF-Iosevka$VARIANT-$RELEASE.zip" | |
| wget "https://github.com/be5invis/Iosevka/releases/download/v$RELEASE/PkgTTF-Iosevka$VARIANT-$RELEASE.zip" | |
| unzip $temp_dir/$name.zip -d $temp_dir/$name | |
| rm -rf ~/.fonts/Iosevka-$VARIANT | |
| mkdir ~/.fonts/Iosevka-$VARIANT | |
| for WEIGHT in ${WEIGHTS_TO_INSTALL[@]}; do | |
| cp $temp_dir/$name/Iosevka$VARIANT-$WEIGHT.ttf ~/.fonts/Iosevka-$VARIANT/Iosevka-$VARIANT-$WEIGHT.ttf | |
| done | |
| done | |
| fc-cache -f -v | |
| rm -rf $temp_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment