M assets/scss/_fonts.scss => assets/scss/_fonts.scss +3 -2
@@ 19,5 19,6 @@
@include -iosevka-one($family, "#{$base-url}-bolditalic", 700, italic);
}
-@include iosevka("Iosevka Web", "/fonts/iosevka");
-@include iosevka("Iosevka Sparkle Web", "/fonts/iosevka-sparkle");
+@include iosevka("Iosevka", "/fonts/iosevka");
+@include iosevka("Iosevka Aile", "/fonts/iosevka-aile");
+@include iosevka("Iosevka Etoile", "/fonts/iosevka-etoile");
M assets/scss/_variables.scss => assets/scss/_variables.scss +3 -3
@@ 28,9 28,9 @@ $dark-border: 1px solid $dark-dividers;
// Fonts!
$default-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
-$sans-serif: "Iosevka Sparkle Web", $default-monospace;
-$serif: "Iosevka Sparkle Web", $default-monospace;
-$monospace: "Iosevka Web", $default-monospace;
+$sans-serif: "Iosevka Aile", $default-monospace;
+$serif: "Iosevka Etoile", $default-monospace;
+$monospace: "Iosevka", $default-monospace;
$font-family: $sans-serif;
$font-size-xsmall: ceil(($font-size-base * 0.75));
A static/fonts/iosevka-aile-bold.ttf => static/fonts/iosevka-aile-bold.ttf +0 -0
A static/fonts/iosevka-aile-bold.woff2 => static/fonts/iosevka-aile-bold.woff2 +0 -0
A static/fonts/iosevka-aile-bolditalic.ttf => static/fonts/iosevka-aile-bolditalic.ttf +0 -0
A static/fonts/iosevka-aile-bolditalic.woff2 => static/fonts/iosevka-aile-bolditalic.woff2 +0 -0
A static/fonts/iosevka-aile-italic.ttf => static/fonts/iosevka-aile-italic.ttf +0 -0
A static/fonts/iosevka-aile-italic.woff2 => static/fonts/iosevka-aile-italic.woff2 +0 -0
A static/fonts/iosevka-aile-regular.ttf => static/fonts/iosevka-aile-regular.ttf +0 -0
A static/fonts/iosevka-aile-regular.woff2 => static/fonts/iosevka-aile-regular.woff2 +0 -0
M static/fonts/iosevka-bold.ttf => static/fonts/iosevka-bold.ttf +0 -0
M static/fonts/iosevka-bold.woff2 => static/fonts/iosevka-bold.woff2 +0 -0
M static/fonts/iosevka-bolditalic.ttf => static/fonts/iosevka-bolditalic.ttf +0 -0
M static/fonts/iosevka-bolditalic.woff2 => static/fonts/iosevka-bolditalic.woff2 +0 -0
A static/fonts/iosevka-etoile-bold.ttf => static/fonts/iosevka-etoile-bold.ttf +0 -0
A static/fonts/iosevka-etoile-bold.woff2 => static/fonts/iosevka-etoile-bold.woff2 +0 -0
A static/fonts/iosevka-etoile-bolditalic.ttf => static/fonts/iosevka-etoile-bolditalic.ttf +0 -0
A static/fonts/iosevka-etoile-bolditalic.woff2 => static/fonts/iosevka-etoile-bolditalic.woff2 +0 -0
A static/fonts/iosevka-etoile-italic.ttf => static/fonts/iosevka-etoile-italic.ttf +0 -0
A static/fonts/iosevka-etoile-italic.woff2 => static/fonts/iosevka-etoile-italic.woff2 +0 -0
A static/fonts/iosevka-etoile-regular.ttf => static/fonts/iosevka-etoile-regular.ttf +0 -0
A static/fonts/iosevka-etoile-regular.woff2 => static/fonts/iosevka-etoile-regular.woff2 +0 -0
M static/fonts/iosevka-italic.ttf => static/fonts/iosevka-italic.ttf +0 -0
M static/fonts/iosevka-italic.woff2 => static/fonts/iosevka-italic.woff2 +0 -0
M static/fonts/iosevka-regular.ttf => static/fonts/iosevka-regular.ttf +0 -0
M static/fonts/iosevka-regular.woff2 => static/fonts/iosevka-regular.woff2 +0 -0
D static/fonts/iosevka-sparkle-bold.ttf => static/fonts/iosevka-sparkle-bold.ttf +0 -0
D static/fonts/iosevka-sparkle-bold.woff2 => static/fonts/iosevka-sparkle-bold.woff2 +0 -0
D static/fonts/iosevka-sparkle-bolditalic.ttf => static/fonts/iosevka-sparkle-bolditalic.ttf +0 -0
D static/fonts/iosevka-sparkle-bolditalic.woff2 => static/fonts/iosevka-sparkle-bolditalic.woff2 +0 -0
D static/fonts/iosevka-sparkle-italic.ttf => static/fonts/iosevka-sparkle-italic.ttf +0 -0
D static/fonts/iosevka-sparkle-italic.woff2 => static/fonts/iosevka-sparkle-italic.woff2 +0 -0
D static/fonts/iosevka-sparkle-regular.ttf => static/fonts/iosevka-sparkle-regular.ttf +0 -0
D static/fonts/iosevka-sparkle-regular.woff2 => static/fonts/iosevka-sparkle-regular.woff2 +0 -0
M update-iosevka => update-iosevka +23 -45
@@ 29,15 29,26 @@ usage() {
echo "Usage: $(basename $0) [-v version] [-s url]"
echo "Download updated Iosevka fonts."
echo " -v VERSION Version of the regular Iosevka font to update"
- echo " -s URL URL tot he latest Iosevka Sparke archive"
}
-extract() {
- file=$1
- dirprefix=$2
- fileprefix=$3
- components=$4
- bsdtar -xvf "$file" -C "$blog_dir/static/fonts" --strip-components $components "$dirprefix"{ttf,woff2}/"$fileprefix"-{bold,bolditalic,italic,regular}.*
+dl_and_extract() {
+ version=$1
+ variant=$2
+
+ suffix=$version
+ fileprefix=iosevka
+ if [[ -n "$variant" ]]; then
+ suffix=$(echo "$variant" | tr A-Z a-z)-$version
+ fileprefix=iosevka-$(echo "$variant" | tr A-Z a-z)
+ fi
+ zip_url="https://github.com/be5invis/Iosevka/releases/download/v$version/webfont-iosevka-$suffix.zip"
+ zip_fn=$(basename "$zip_url")
+
+ msg "Downloading ${CYAN}$zip_fn${NOFORMAT}..."
+ wget -nv -t 0 --show-progress "$zip_url"
+ msg "Extracting ${CYAN}$zip_fn${NOFORMAT}..."
+
+ bsdtar -xvf "$zip_fn" -C "$blog_dir/static/fonts" --strip-components 1 {ttf,woff2}/"$fileprefix"-{bold,bolditalic,italic,regular}.*
}
if [[ $# -eq 0 ]]; then
@@ 45,47 56,14 @@ if [[ $# -eq 0 ]]; then
exit 1
fi
-VERSION=""
-SPARKLE_URL=""
-
-while getopts ":hs:v:" arg; do
- case $arg in
- v)
- VERSION=$OPTARG
- ;;
- s)
- SPARKLE_URL=$OPTARG
- ;;
- h)
- usage
- exit 0
- ;;
- ?)
- echo "Invalid option: -$OPTARG"
- echo
- usage
- exit 1
- ;;
- esac
-done
+VERSION="$1"
cd "$tmpd"
if [[ $VERSION ]]; then
- zip_url="https://github.com/be5invis/Iosevka/releases/download/v$VERSION/webfont-iosevka-$VERSION.zip"
- zip_fn=$(basename "$zip_url")
- msg "Downloading ${CYAN}$zip_fn${NOFORMAT}..."
- wget -nv --show-progress "$zip_url"
- msg "Extracting ${CYAN}$zip_fn${NOFORMAT}..."
- extract "$zip_fn" "" iosevka 1
-fi
-
-if [[ $SPARKLE_URL ]]; then
- zip_fn=$(basename "$SPARKLE_URL")
- msg "Downloading ${PURPLE}$zip_fn${NOFORMAT}..."
- wget -nv --show-progress "$SPARKLE_URL"
- msg "Extracting ${PURPLE}$zip_fn${NOFORMAT}..."
- extract "$zip_fn" iosevka-sparkle/ iosevka-sparkle 2
+ dl_and_extract $VERSION ""
+ dl_and_extract $VERSION "Aile"
+ dl_and_extract $VERSION "Etoile"
fi
-echo "All done!"
+msg "All done!"