Skip to content

Commit

Permalink
增加termux自动设置字体
Browse files Browse the repository at this point in the history
  • Loading branch information
chxuan committed Feb 23, 2020
1 parent 5d61595 commit 746fa09
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Binary file added fonts/DejaVu.ttf
Binary file not shown.
13 changes: 13 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,18 @@ function install_fonts_on_mac()
cp ./fonts/Droid\ Sans\ Mono\ Nerd\ Font\ Complete.otf ~/Library/Fonts
}

# 安装android平台字体
function install_fonts_on_android()
{
rm -rf ~/.termux/font.ttf
mkdir ~/.termux
cp ./fonts/DejaVu.ttf ~/.termux/font.ttf

# 刷新style
REL="am broadcast --user 0 -a com.termux.app.reload_style com.termux"
$REL > /dev/null
}

# 安装linux平台字体
function install_fonts_on_linux()
{
Expand Down Expand Up @@ -443,6 +455,7 @@ function install_vimplus_on_android()
backup_vimrc_and_vim
install_prepare_software_on_android
copy_files
install_fonts_on_android
install_ycm_on_android
install_vim_plugin
print_logo
Expand Down
13 changes: 13 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ function update_fonts_on_mac()
cp ./fonts/Droid\ Sans\ Mono\ Nerd\ Font\ Complete.otf ~/Library/Fonts
}

# 更新android平台字体
function update_fonts_on_android()
{
rm -rf ~/.termux/font.ttf
mkdir ~/.termux
cp ./fonts/DejaVu.ttf ~/.termux/font.ttf

# 刷新style
REL="am broadcast --user 0 -a com.termux.app.reload_style com.termux"
$REL > /dev/null
}

# 更新linux平台字体
function update_fonts_on_linux()
{
Expand Down Expand Up @@ -110,6 +122,7 @@ function update_vimplus_on_android()
{
git pull origin master
copy_files
update_fonts_on_android
update_vim_plugin
print_logo
}
Expand Down

0 comments on commit 746fa09

Please sign in to comment.