ryanoasis/nerd-fonts

[Bug] 'CascadiaMono' directory in master branch seems to be missing fonts

Closed this issue · 2 comments

Requirements

  • I have searched the issues for my issue and found nothing related or helpful
  • I have searched the FAQ for help
  • I have checked the Wiki for help

Experienced Behavior

I made a bash script to download and install nerd-fonts from GitHub repository. After picking 'CascadiaMono', the git clone directory is empty. I am able to install other fonts without any issues.

https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/CascadiaMono

Expected Behavior

CascadiaMono folder should contain ttf or otf font files.

Example Symbols or Text

nerdfont.sh

#!/usr/bin/env bash

usage()
{
	cat << EOF

Description:
Install any nerd font in ${HOME}/.local/share/fonts/

Syntax:
$ ${0##*/} 'font-name'

Fonts:
https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts

Usage:
$ ${0##*/} 'LiberationMono'

EOF
}

if [[ "${#}" -eq 0 ]]; then
	usage
	exit
fi


{ set -x ; } &> /dev/null

# Remove old directories
rm -fr "${HOME}"/src/tmp/nerd-fonts/
rm -fr "${HOME}"/.local/share/fonts/"${1}"/

# Create directories
mkdir -p "${HOME}"/src/tmp/nerd-fonts/
mkdir -p "${HOME}"/.local/share/fonts/"${1}"/

# Sparse clone nerd font repo
git clone --filter=blob:none --sparse https://github.com/ryanoasis/nerd-fonts "${HOME}"/src/tmp/nerd-fonts/

# Change working directory
pushd "${HOME}"/src/tmp/nerd-fonts || exit

# Sparse checkout font folder
git sparse-checkout add patched-fonts/"${1}"/

# Change working directory
pushd "${HOME}"/src/tmp/nerd-fonts/patched-fonts || exit

# Move ttf and otf font files to user directories
find "${HOME}"/src/tmp/nerd-fonts/patched-fonts  -type f -iname "*.ttf" -exec mv -f {} "${HOME}"/.local/share/fonts/"${1}"/ \;
find "${HOME}"/src/tmp/nerd-fonts/patched-fonts  -type f -iname "*.otf" -exec mv -f {} "${HOME}"/.local/share/fonts/"${1}"/ \;

# Update font cache
echo 'updating font cache...'
fc-cache -r

# Pop directories from stack
popd || exit
popd || exit

{ set +x ; } &> /dev/null

Input

$ nerdfont.sh 'CascadiaMono'

Output

+ rm -fr /home/tur1ngb0x/src/tmp/nerd-fonts/
+ rm -fr /home/tur1ngb0x/.local/share/fonts/CascadiaMono/
+ mkdir -p /home/tur1ngb0x/src/tmp/nerd-fonts/
+ mkdir -p /home/tur1ngb0x/.local/share/fonts/CascadiaMono/
+ git clone --filter=blob:none --sparse https://github.com/ryanoasis/nerd-fonts /home/tur1ngb0x/src/tmp/nerd-fonts/
Cloning into '/home/tur1ngb0x/src/tmp/nerd-fonts'...
remote: Enumerating objects: 34600, done.
remote: Counting objects: 100% (1256/1256), done.
remote: Compressing objects: 100% (714/714), done.
remote: Total 34600 (delta 550), reused 1083 (delta 507), pack-reused 33344 (from 1)
Receiving objects: 100% (34600/34600), 6.06 MiB | 13.20 MiB/s, done.
Resolving deltas: 100% (15751/15751), done.
remote: Enumerating objects: 33, done.
remote: Counting objects: 100% (30/30), done.
remote: Compressing objects: 100% (19/19), done.
remote: Total 33 (delta 11), reused 15 (delta 10), pack-reused 3 (from 1)
Receiving objects: 100% (33/33), 2.55 MiB | 4.14 MiB/s, done.
Resolving deltas: 100% (11/11), done.
Updating files: 100% (33/33), done.
+ pushd /home/tur1ngb0x/src/tmp/nerd-fonts
~/src/tmp/nerd-fonts ~
+ git sparse-checkout add patched-fonts/CascadiaMono/
remote: Enumerating objects: 1, done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 1 (from 1)
Receiving objects: 100% (1/1), 1.62 KiB | 1.62 MiB/s, done.
+ pushd /home/tur1ngb0x/src/tmp/nerd-fonts/patched-fonts
~/src/tmp/nerd-fonts/patched-fonts ~/src/tmp/nerd-fonts ~
+ find /home/tur1ngb0x/src/tmp/nerd-fonts/patched-fonts -type f -iname '*.ttf' -exec mv -f '{}' /home/tur1ngb0x/.local/share/fonts/CascadiaMono/ ';'
+ find /home/tur1ngb0x/src/tmp/nerd-fonts/patched-fonts -type f -iname '*.otf' -exec mv -f '{}' /home/tur1ngb0x/.local/share/fonts/CascadiaMono/ ';'
+ echo 'updating font cache...'
updating font cache...
+ fc-cache -r
+ popd
~/src/tmp/nerd-fonts ~
+ popd
~

Input

$ ls /home/pd/.local/share/fonts/CascadiaMono/

Output

total 0

Font Used

CascadiaMono

Source of Font File

https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/CascadiaMono

Terminal Emulator (and the title of the terminal window)

konsole, maximized

Operating System and Version

Kubuntu 24.04

Screenshots

No response

Already since several releases the in-repo release has been sunset and hast stopped for new fonts and will stop for old fonts.
Please use the release artefacts instead, i.e.

https://github.com/ryanoasis/nerd-fonts/releases/latest

A look into the documentation (see images below)

https://github.com/ryanoasis/nerd-fonts?tab=readme-ov-file#option-6-install-script
https://github.com/ryanoasis/nerd-fonts/tree/v3.2.1?tab=readme-ov-file#important-notices
https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/CascadiaMono

There is a script in our script dir that helps download the release artefacts from a bash shell (fetch-archives.sh)

But I will change the documentation to make this even more clear, thank you.

Screenshot 2024-09-01 at 07 13 38 Screenshot 2024-09-01 at 07 21 23 Screenshot 2024-09-01 at 07 24 49