1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 21:00:03 +08:00

fix(fonts): download Sauce Code Pro Nerd Font automatically

close https://github.com/SpaceVim/SpaceVim/issues/4616
This commit is contained in:
wsdjeg 2022-04-12 16:04:44 +08:00
parent 2c385518c0
commit 39cbef5f3f
2 changed files with 4 additions and 29 deletions

View File

@ -342,7 +342,7 @@ welcome () {
# download_font {{{
download_font () {
url="https://raw.githubusercontent.com/wsdjeg/DotFiles/7a75a186c6db9ad6f02cafba8d4c7bc78f47304c/local/share/fonts/${1// /%20}"
url="https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/SourceCodePro/Regular/complete/${1// /%20}"
path="$HOME/.local/share/fonts/$1"
if [[ -f "$path" ]]
then
@ -361,19 +361,7 @@ install_fonts () {
if [[ ! -d "$HOME/.local/share/fonts" ]]; then
mkdir -p $HOME/.local/share/fonts
fi
download_font "DejaVu Sans Mono Bold Oblique for Powerline.ttf"
download_font "DejaVu Sans Mono Bold for Powerline.ttf"
download_font "DejaVu Sans Mono Oblique for Powerline.ttf"
download_font "DejaVu Sans Mono for Powerline.ttf"
download_font "DroidSansMonoForPowerlinePlusNerdFileTypesMono.otf"
download_font "Ubuntu Mono derivative Powerline Nerd Font Complete.ttf"
download_font "WEBDINGS.TTF"
download_font "WINGDNG2.ttf"
download_font "WINGDNG3.ttf"
download_font "devicons.ttf"
download_font "mtextra.ttf"
download_font "symbol.ttf"
download_font "wingding.ttf"
download_font "Sauce Code Pro Nerd Font Complete.ttf"
info "正在构建字体缓存,请稍等..."
if [ $System == "Darwin" ];then
if [ ! -e "$HOME/Library/Fonts" ];then

View File

@ -333,9 +333,8 @@ welcome () {
# download_font {{{
download_font () {
url="https://raw.githubusercontent.com/wsdjeg/DotFiles/7a75a186c6db9ad6f02cafba8d4c7bc78f47304c/local/share/fonts/${1// /%20}"
url="https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/SourceCodePro/Regular/complete/${1// /%20}"
path="$HOME/.local/share/fonts/$1"
# Clean up after https://github.com/SpaceVim/SpaceVim/issues/2532
if [[ -f "$path" && ! -s "$path" ]]
then
rm "$path"
@ -357,19 +356,7 @@ install_fonts () {
if [[ ! -d "$HOME/.local/share/fonts" ]]; then
mkdir -p $HOME/.local/share/fonts
fi
download_font "DejaVu Sans Mono Bold Oblique for Powerline.ttf"
download_font "DejaVu Sans Mono Bold for Powerline.ttf"
download_font "DejaVu Sans Mono Oblique for Powerline.ttf"
download_font "DejaVu Sans Mono for Powerline.ttf"
download_font "DroidSansMonoForPowerlinePlusNerdFileTypesMono.otf"
download_font "Ubuntu Mono derivative Powerline Nerd Font Complete.ttf"
download_font "WEBDINGS.TTF"
download_font "WINGDNG2.ttf"
download_font "WINGDNG3.ttf"
download_font "devicons.ttf"
download_font "mtextra.ttf"
download_font "symbol.ttf"
download_font "wingding.ttf"
download_font "Sauce Code Pro Nerd Font Complete.ttf"
info "Updating font cache, please wait ..."
if [ $System == "Darwin" ];then
if [ ! -e "$HOME/Library/Fonts" ];then