浏览代码

Adding script to install fonts

pull/80/head
Kurt Preston 10 年前
父节点
当前提交
a3e58befe9
共有 2 个文件被更改,包括 34 次插入6 次删除
  1. +10
    -6
      README.rst
  2. +24
    -0
      install.sh

+ 10
- 6
README.rst 查看文件

@ -4,6 +4,16 @@ Powerline fonts
This repository contains pre-patched and adjusted fonts for usage with
the new Powerline plugin.
Installation
------------
Run ``./install.sh`` to install all Powerline Fonts or see the documentation_ for details.
.. _documentation: https://powerline.readthedocs.org/en/latest/installation/linux.html#font-installation
Font Families
-------------
================================== =================== ====================================
Powerline Font Family Formerly Known As License
================================== =================== ====================================
@ -19,9 +29,3 @@ the new Powerline plugin.
Terminess Powerline Terminus SIL Open Font License, Version 1.1
Ubuntu Mono derivative Powerline Ubuntu Mono Ubuntu Font License, Version 1.0
================================== =================== ====================================
**IMPORTANT:** If you're running Linux you may not have to use a
patched font! See the `Powerline font installation instructions`__ for
details.
__ https://powerline.readthedocs.org/en/latest/installation/linux.html#font-installation

+ 24
- 0
install.sh 查看文件

@ -0,0 +1,24 @@
#!/bin/bash
# Set source and target directories
powerline_fonts_dir=$( cd "$( dirname "$0" )" && pwd )
if [[ `uname` == 'Darwin' ]]; then
# MacOS
font_dir="$HOME/Library/Fonts"
else
# Linux
font_dir="$HOME/.fonts"
mkdir -p $font_dir
fi
# Copy all fonts to user fonts directory
find_command="find $powerline_fonts_dir -name '*.[o,t]tf' -type f -print0"
eval $find_command | xargs -0 -I % cp % $font_dir/
# Reset font cache on Linux
if [[ -n `which fc-cache` ]]; then
fc-cache -f $font_dir
fi
echo "All Powerline fonts installed to $font_dir"

正在加载...
取消
保存