Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On Linux, install fonts in ~/.local/share/fonts #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions fnt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ case "$s" in
check="curl chafa otfinfo"
i="apt"
md5="md5sum"
target="$HOME/.fonts/"
target="$HOME/.local/share/fonts/"
if [ 0 -eq `id -u` ]; then
target="/usr/local/share/fonts/"
mkdir -p $target
Expand Down Expand Up @@ -103,8 +103,8 @@ case "$1" in
list|-l)
# echo Listing...
# macOS mainly comes with *.ttc (truetype font collections, that can not be processed by otfinfo)
#ls -1 /System/Library/Fonts/*.?tf /usr/share/fonts/*type/*/*.?tf $HOME/Library/Fonts/*.?tf $HOME/.fonts/*.?tf 2>/dev/null | while read f; do
ls -1 $HOME/Library/Fonts/*.?tf $HOME/.fonts/*.?tf /usr/local/share/fonts/*.?tf 2>/dev/null | while read f; do
#ls -1 /System/Library/Fonts/*.?tf /usr/share/fonts/*type/*/*.?tf $HOME/Library/Fonts/*.?tf $HOME/.local/share/fonts $HOME/.fonts/*.?tf 2>/dev/null | while read f; do
ls -1 $HOME/Library/Fonts/*.?tf $HOME/.local/share/fonts/*.?tf $HOME/.fonts/*.?tf /usr/local/share/fonts/*.?tf 2>/dev/null | while read f; do
echo "$f" [$(otfinfo -u "$f" 2>/dev/null|wc -l|awk '{print $1}')] | sed s,.*/,,
done
;;
Expand Down