From 608f7fa600398d83fdc271f7d870f66fb6496aed Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Fri, 13 Jan 2023 16:24:52 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=B3=D0=BB=D0=B8=D1=84=D1=8B=20Nerd=20Fonts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build-iosevka-prog-font.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/build-iosevka-prog-font.sh b/build-iosevka-prog-font.sh index 6fb63c0..58ce03d 100755 --- a/build-iosevka-prog-font.sh +++ b/build-iosevka-prog-font.sh @@ -1,14 +1,27 @@ #!/bin/bash +set -e + IOSEVKA_VERSION="17.0.2" +FONT_NAME=iosevka-prog FILE=$( readlink -f "${BASH_SOURCE[0]}" ) DIR=$( dirname "${FILE}" ) +DIST="${DIR}/dist" +OBLIQUE="${DIST}/oblique" +REGULAR="${DIST}/regular" CONFIG="${DIR}/private-build-plans.toml" +OUT_DIR="${DIST}/${FONT_NAME}/ttf" if [ -r "${CONFIG}" ]; then if command -v docker >/dev/null 2>&1; then - sudo docker run -e FONT_VERSION="${IOSEVKA_VERSION}" -it -v "$(pwd)":/build avivace/iosevka-build -- ttf::iosevka-prog - sudo chown -R "$(id -u)":"$(id -g)" "${DIR}/dist" + docker run -e FONT_VERSION="${IOSEVKA_VERSION}" -it -v "$DIR":/build avivace/iosevka-build -- ttf::${FONT_NAME} + sudo chown -R "$(id -u)":"$(id -g)" "${DIST}" + mkdir -p "${OBLIQUE}" + cp "${OUT_DIR}/${FONT_NAME}-oblique.ttf" "${OBLIQUE}" + docker run -v "${OBLIQUE}":/in -v "${OUT_DIR}":/out nerdfonts/patcher --complete --careful --adjust-line-height + mkdir -p "${REGULAR}" + cp "${OUT_DIR}/${FONT_NAME}-regular.ttf" "${REGULAR}" + docker run -v "${REGULAR}":/in -v "${OUT_DIR}":/out nerdfonts/patcher --complete --careful --adjust-line-height --mono --removeligatures else echo "Docker executable not found" fi