mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 08:50:06 +08:00
fix(fonts): download Sauce Code Pro Nerd Font
automatically
close https://github.com/SpaceVim/SpaceVim/issues/4616
This commit is contained in:
parent
2c385518c0
commit
39cbef5f3f
@ -342,7 +342,7 @@ welcome () {
|
|||||||
|
|
||||||
# download_font {{{
|
# download_font {{{
|
||||||
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"
|
path="$HOME/.local/share/fonts/$1"
|
||||||
if [[ -f "$path" ]]
|
if [[ -f "$path" ]]
|
||||||
then
|
then
|
||||||
@ -361,19 +361,7 @@ install_fonts () {
|
|||||||
if [[ ! -d "$HOME/.local/share/fonts" ]]; then
|
if [[ ! -d "$HOME/.local/share/fonts" ]]; then
|
||||||
mkdir -p $HOME/.local/share/fonts
|
mkdir -p $HOME/.local/share/fonts
|
||||||
fi
|
fi
|
||||||
download_font "DejaVu Sans Mono Bold Oblique for Powerline.ttf"
|
download_font "Sauce Code Pro Nerd Font Complete.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"
|
|
||||||
info "正在构建字体缓存,请稍等..."
|
info "正在构建字体缓存,请稍等..."
|
||||||
if [ $System == "Darwin" ];then
|
if [ $System == "Darwin" ];then
|
||||||
if [ ! -e "$HOME/Library/Fonts" ];then
|
if [ ! -e "$HOME/Library/Fonts" ];then
|
||||||
|
@ -333,9 +333,8 @@ welcome () {
|
|||||||
|
|
||||||
# download_font {{{
|
# download_font {{{
|
||||||
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"
|
path="$HOME/.local/share/fonts/$1"
|
||||||
# Clean up after https://github.com/SpaceVim/SpaceVim/issues/2532
|
|
||||||
if [[ -f "$path" && ! -s "$path" ]]
|
if [[ -f "$path" && ! -s "$path" ]]
|
||||||
then
|
then
|
||||||
rm "$path"
|
rm "$path"
|
||||||
@ -357,19 +356,7 @@ install_fonts () {
|
|||||||
if [[ ! -d "$HOME/.local/share/fonts" ]]; then
|
if [[ ! -d "$HOME/.local/share/fonts" ]]; then
|
||||||
mkdir -p $HOME/.local/share/fonts
|
mkdir -p $HOME/.local/share/fonts
|
||||||
fi
|
fi
|
||||||
download_font "DejaVu Sans Mono Bold Oblique for Powerline.ttf"
|
download_font "Sauce Code Pro Nerd Font Complete.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"
|
|
||||||
info "Updating font cache, please wait ..."
|
info "Updating font cache, please wait ..."
|
||||||
if [ $System == "Darwin" ];then
|
if [ $System == "Darwin" ];then
|
||||||
if [ ! -e "$HOME/Library/Fonts" ];then
|
if [ ! -e "$HOME/Library/Fonts" ];then
|
||||||
|
Loading…
Reference in New Issue
Block a user