From b84ba672c73d67ce0791c5979e1bbc3491bd58ae Mon Sep 17 00:00:00 2001 From: Daniel Bauer Date: Wed, 14 Jan 2026 10:49:59 +0100 Subject: [PATCH] added fontconfig file --- run_onchange_before_25_fonts.sh | 51 +++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100755 run_onchange_before_25_fonts.sh diff --git a/run_onchange_before_25_fonts.sh b/run_onchange_before_25_fonts.sh new file mode 100755 index 0000000..bf3301d --- /dev/null +++ b/run_onchange_before_25_fonts.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +set -euo pipefail + +FONT_DIR="${HOME}/.local/share/fonts" +TEMP_DIR=$(mktemp -d) + +cleanup() { + rm -rf "$TEMP_DIR" +} +trap cleanup EXIT + +mkdir -p "$FONT_DIR" + +echo "Installing fonts to ${FONT_DIR}..." + +# Install Nerd Fonts +NERD_FONTS_VERSION="v3.4.0" +NERD_FONTS=( + "UbuntuMono" + "SourceCodePro" + "JetBrainsMono" + "AtkinsonHyperlegibleMono" +) + +for font in "${NERD_FONTS[@]}"; do + echo "Downloading ${font} Nerd Font..." + curl -fsSL "https://github.com/ryanoasis/nerd-fonts/releases/download/${NERD_FONTS_VERSION}/${font}.zip" -o "${TEMP_DIR}/${font}.zip" + + unzip -q "${TEMP_DIR}/${font}.zip" -d "${TEMP_DIR}/${font}" + + # Copy only TTF and OTF files, excluding Windows-compatible versions + find "${TEMP_DIR}/${font}" -type f \( -name "*.ttf" -o -name "*.otf" \) ! -name "*Windows Compatible*" -exec cp {} "${FONT_DIR}/" \; + + echo "Installed ${font} Nerd Font" +done + +# Install Charis SIL +echo "Downloading Charis SIL..." +CHARIS_VERSION="6.200" +curl -fsSL "https://software.sil.org/downloads/r/charis/CharisSIL-${CHARIS_VERSION}.zip" -o "${TEMP_DIR}/CharisSIL.zip" + +unzip -q "${TEMP_DIR}/CharisSIL.zip" -d "${TEMP_DIR}/charis" +find "${TEMP_DIR}/charis" -type f \( -name "*.ttf" -o -name "*.otf" \) -exec cp {} "${FONT_DIR}/" \; + +echo "Installed Charis SIL" + +# Update font cache +echo "Updating font cache..." +fc-cache -f "$FONT_DIR" +echo "Done" +