Browse Source

Adding script to install fonts

pull/80/head
Kurt Preston 10 years ago
parent
commit
a3e58befe9
2 changed files with 34 additions and 6 deletions
  1. +10
    -6
      README.rst
  2. +24
    -0
      install.sh

+ 10
- 6
README.rst View File

@ -4,6 +4,16 @@ Powerline fonts
This repository contains pre-patched and adjusted fonts for usage with This repository contains pre-patched and adjusted fonts for usage with
the new Powerline plugin. 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 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 Terminess Powerline Terminus SIL Open Font License, Version 1.1
Ubuntu Mono derivative Powerline Ubuntu Mono Ubuntu Font License, Version 1.0 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 View File

@ -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"

Loading…
Cancel
Save