1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

Merge pull request #560 from pshirshov/fix/broken-fontrestore

fixes #559, #485: workaround for broken fontrestore on Ventura
This commit is contained in:
Domen Kožar 2022-10-26 10:20:05 +01:00 committed by GitHub
commit f6648ca069
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,20 +58,22 @@ in
fi
done
fontrestore default -n 2>&1 | while read -r f; do
case $f in
/Library/Fonts/*)
font=''${f##*/}
if [ ! -e "$systemConfig/Library/Fonts/$font" ]; then
echo "removing font $font..." >&2
rm "/Library/Fonts/$font"
fi
;;
/*)
# ignoring unexpected fonts
;;
esac
done
if [[ "`sw_vers -productVersion`" < "13.0" ]]; then
fontrestore default -n 2>&1 | while read -r f; do
case $f in
/Library/Fonts/*)
font=''${f##*/}
if [ ! -e "$systemConfig/Library/Fonts/$font" ]; then
echo "removing font $font..." >&2
rm "/Library/Fonts/$font"
fi
;;
/*)
# ignoring unexpected fonts
;;
esac
done
fi
'';
};