From cb0c3bde8bd59bb5cd0169a00a103e050974212d Mon Sep 17 00:00:00 2001 From: fiftydinar <65243233+fiftydinar@users.noreply.github.com> Date: Tue, 17 Sep 2024 13:56:58 +0200 Subject: [PATCH] chore(fonts): Force clean then regenerate font cache Should fix some corner cases where font is not applied. Fixes: #213 --- modules/fonts/sources/google-fonts.sh | 4 ++-- modules/fonts/sources/nerd-fonts.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/fonts/sources/google-fonts.sh b/modules/fonts/sources/google-fonts.sh index c16235b..eecb74d 100644 --- a/modules/fonts/sources/google-fonts.sh +++ b/modules/fonts/sources/google-fonts.sh @@ -8,7 +8,7 @@ echo "Installation of google-fonts started" rm -rf "${DEST}" for FONT in "${FONTS[@]}"; do - if [ -n "$FONT" ]; then + if [ -n "${FONT}" ]; then FONT="${FONT#"${FONT%%[![:space:]]*}"}" # Trim leading whitespace FONT="${FONT%"${FONT##*[![:space:]]}"}" # Trim trailing whitespace mkdir -p "${DEST}/${FONT}" @@ -43,4 +43,4 @@ for FONT in "${FONTS[@]}"; do fi done -fc-cache -f "${DEST}" +fc-cache --system-only --really-force "${DEST}" diff --git a/modules/fonts/sources/nerd-fonts.sh b/modules/fonts/sources/nerd-fonts.sh index a641fd2..237872f 100644 --- a/modules/fonts/sources/nerd-fonts.sh +++ b/modules/fonts/sources/nerd-fonts.sh @@ -6,7 +6,7 @@ URL="https://github.com/ryanoasis/nerd-fonts/releases/latest/download" DEST="/usr/share/fonts/nerd-fonts" echo "Installation of nerd-fonts started" -rm -rf "$DEST" +rm -rf "${DEST}" mkdir -p /tmp/fonts for FONT in "${FONTS[@]}"; do @@ -22,4 +22,4 @@ for FONT in "${FONTS[@]}"; do done rm -rf /tmp/fonts -fc-cache -f "${DEST}" \ No newline at end of file +fc-cache --system-only --really-force "${DEST}"