Skip to content

Commit 6ee2f9c

Browse files
committed
Create gh-pages for '56f06f8 Update font installation instructions'
1 parent 97e8f9f commit 6ee2f9c

7 files changed

Lines changed: 130 additions & 1 deletion

File tree

_sources/fontpatching.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Powerline provides a font patcher for custom glyphs like the segment
77
dividers (arrows), branch symbol, padlock symbol, etc. The font patcher
88
requires FontForge with Python bindings to work.
99

10+
You may be able to avoid patching your coding font to use the custom glyphs!
11+
See :ref:`font-installation` for instructions.
12+
1013
Check out the `powerline-fonts
1114
<https://github.com/Lokaltog/powerline-fonts>`_ repository on GitHub for
1215
patched versions of some popular programming fonts.

_sources/overview.txt

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ Requirements
66

77
Powerline requires Python 2.7 to work.
88

9+
Powerline uses several special glyphs to get the arrow effect and some
10+
custom symbols for developers. This requires that you either have the symbol
11+
font or a patched font on your system. See `Font installation`_ for more
12+
details.
13+
914
Vim plugin requirements
1015
^^^^^^^^^^^^^^^^^^^^^^^
1116

@@ -48,6 +53,61 @@ they provide an easy way of installing and upgrading Powerline:
4853

4954
* `Arch Linux (AUR) <https://aur.archlinux.org/packages/powerline-git/>`_
5055

56+
.. _font-installation:
57+
58+
Font installation
59+
^^^^^^^^^^^^^^^^^
60+
61+
Linux
62+
*****
63+
64+
If you're running Linux, you may be able to avoid patching your coding font
65+
to get the special glyphs required by Powerline. This works by utilizing
66+
fontconfig's fallback font feature, which replaces missing glyphs in a font
67+
with another font on your system.
68+
69+
This has been tested and works very well with many different coding fonts,
70+
but some fonts may look terrible, in which case you'll have to use a patched
71+
font (see :ref:`font-patching` for details).
72+
73+
1. Download the `latest version of PowerlineSymbols
74+
<https://github.com/Lokaltog/powerline/raw/develop/powerline/fontpatcher/PowerlineSymbols.otf>`_.
75+
2. Move :file:`PowerlineSymbols.otf` to :file:`~/.fonts`.
76+
3. Run ``fc-cache -vf ~/.fonts`` to update your font cache.
77+
4. Edit your fontconfig file, located in either :file:`~/.fonts.conf` or
78+
:file:`~/.config/fontconfig/fonts.conf`, depending on your fontconfig
79+
version. If your fontconfig file is empty, add the entire code block
80+
below. If you already have a custom font configuration, only add the
81+
``<alias>`` block to your font configuration:
82+
83+
.. code-block:: xml
84+
85+
<?xml version="1.0"?>
86+
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
87+
88+
<fontconfig>
89+
<alias>
90+
<family>monospace</family>
91+
<prefer>
92+
<family>PowerlineSymbols</family>
93+
<family>YOUR MONOSPACE FONT HERE</family>
94+
</prefer>
95+
</alias>
96+
</fontconfig>
97+
98+
Remember to replace ``YOUR MONOSPACE FONT HERE`` with your preferred
99+
coding font.
100+
5. Configure your terminal emulator or gvim to use the ``monospace`` font.
101+
6. If you still don't see the arrow symbols, please close all instances of
102+
your terminal emulator or gvim. You may also have to restart X for the
103+
changes to take effect.
104+
105+
OS X and Windows
106+
****************
107+
108+
You'll have to use a patched font to use the Powerline symbols. See
109+
:ref:`font-patching` for details on font patching and pre-patched fonts.
110+
51111
Usage
52112
-----
53113

fontpatching.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ <h3>Navigation</h3>
5555
<p>Powerline provides a font patcher for custom glyphs like the segment
5656
dividers (arrows), branch symbol, padlock symbol, etc. The font patcher
5757
requires FontForge with Python bindings to work.</p>
58+
<p>You may be able to avoid patching your coding font to use the custom glyphs!
59+
See <a class="reference internal" href="overview.html#font-installation"><em>Font installation</em></a> for instructions.</p>
5860
<p>Check out the <a class="reference external" href="https://github.com/Lokaltog/powerline-fonts">powerline-fonts</a> repository on GitHub for
5961
patched versions of some popular programming fonts.</p>
6062
<div class="admonition warning">

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ <h1>Powerline<a class="headerlink" href="#powerline" title="Permalink to this he
6363
<li class="toctree-l2"><a class="reference internal" href="overview.html#installation">Installation</a><ul>
6464
<li class="toctree-l3"><a class="reference internal" href="overview.html#installing-with-pip">Installing with <tt class="docutils literal"><span class="pre">pip</span></tt></a></li>
6565
<li class="toctree-l3"><a class="reference internal" href="overview.html#distribution-specific-packages">Distribution-specific packages</a></li>
66+
<li class="toctree-l3"><a class="reference internal" href="overview.html#font-installation">Font installation</a></li>
6667
</ul>
6768
</li>
6869
<li class="toctree-l2"><a class="reference internal" href="overview.html#usage">Usage</a><ul>

objects.inv

23 Bytes
Binary file not shown.

overview.html

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ <h1>Overview<a class="headerlink" href="#overview" title="Permalink to this head
5555
<div class="section" id="requirements">
5656
<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline"></a></h2>
5757
<p>Powerline requires Python 2.7 to work.</p>
58+
<p>Powerline uses several special glyphs to get the arrow effect and some
59+
custom symbols for developers. This requires that you either have the symbol
60+
font or a patched font on your system. See <a class="reference internal" href="#id1">Font installation</a> for more
61+
details.</p>
5862
<div class="section" id="vim-plugin-requirements">
5963
<h3>Vim plugin requirements<a class="headerlink" href="#vim-plugin-requirements" title="Permalink to this headline"></a></h3>
6064
<p>The vim plugin requires a vim version with Python 2.7 support compiled in.
@@ -96,6 +100,60 @@ <h3>Distribution-specific packages<a class="headerlink" href="#distribution-spec
96100
<li><a class="reference external" href="https://aur.archlinux.org/packages/powerline-git/">Arch Linux (AUR)</a></li>
97101
</ul>
98102
</div>
103+
<div class="section" id="font-installation">
104+
<span id="id1"></span><h3>Font installation<a class="headerlink" href="#font-installation" title="Permalink to this headline"></a></h3>
105+
<div class="section" id="linux">
106+
<h4>Linux<a class="headerlink" href="#linux" title="Permalink to this headline"></a></h4>
107+
<p>If you&#8217;re running Linux, you may be able to avoid patching your coding font
108+
to get the special glyphs required by Powerline. This works by utilizing
109+
fontconfig&#8217;s fallback font feature, which replaces missing glyphs in a font
110+
with another font on your system.</p>
111+
<p>This has been tested and works very well with many different coding fonts,
112+
but some fonts may look terrible, in which case you&#8217;ll have to use a patched
113+
font (see <a class="reference internal" href="fontpatching.html#font-patching"><em>Font patching</em></a> for details).</p>
114+
<ol class="arabic">
115+
<li><p class="first">Download the <a class="reference external" href="https://github.com/Lokaltog/powerline/raw/develop/powerline/fontpatcher/PowerlineSymbols.otf">latest version of PowerlineSymbols</a>.</p>
116+
</li>
117+
<li><p class="first">Move <tt class="file docutils literal"><span class="pre">PowerlineSymbols.otf</span></tt> to <tt class="file docutils literal"><span class="pre">~/.fonts</span></tt>.</p>
118+
</li>
119+
<li><p class="first">Run <tt class="docutils literal"><span class="pre">fc-cache</span> <span class="pre">-vf</span> <span class="pre">~/.fonts</span></tt> to update your font cache.</p>
120+
</li>
121+
<li><p class="first">Edit your fontconfig file, located in either <tt class="file docutils literal"><span class="pre">~/.fonts.conf</span></tt> or
122+
<tt class="file docutils literal"><span class="pre">~/.config/fontconfig/fonts.conf</span></tt>, depending on your fontconfig
123+
version. If your fontconfig file is empty, add the entire code block
124+
below. If you already have a custom font configuration, only add the
125+
<tt class="docutils literal"><span class="pre">&lt;alias&gt;</span></tt> block to your font configuration:</p>
126+
<div class="highlight-xml"><div class="highlight"><pre><span class="cp">&lt;?xml version=&quot;1.0&quot;?&gt;</span>
127+
<span class="cp">&lt;!DOCTYPE fontconfig SYSTEM &quot;fonts.dtd&quot;&gt;</span>
128+
129+
<span class="nt">&lt;fontconfig&gt;</span>
130+
<span class="nt">&lt;alias&gt;</span>
131+
<span class="nt">&lt;family&gt;</span>monospace<span class="nt">&lt;/family&gt;</span>
132+
<span class="nt">&lt;prefer&gt;</span>
133+
<span class="nt">&lt;family&gt;</span>PowerlineSymbols<span class="nt">&lt;/family&gt;</span>
134+
<span class="nt">&lt;family&gt;</span>YOUR MONOSPACE FONT HERE<span class="nt">&lt;/family&gt;</span>
135+
<span class="nt">&lt;/prefer&gt;</span>
136+
<span class="nt">&lt;/alias&gt;</span>
137+
<span class="nt">&lt;/fontconfig&gt;</span>
138+
</pre></div>
139+
</div>
140+
<p>Remember to replace <tt class="docutils literal"><span class="pre">YOUR</span> <span class="pre">MONOSPACE</span> <span class="pre">FONT</span> <span class="pre">HERE</span></tt> with your preferred
141+
coding font.</p>
142+
</li>
143+
<li><p class="first">Configure your terminal emulator or gvim to use the <tt class="docutils literal"><span class="pre">monospace</span></tt> font.</p>
144+
</li>
145+
<li><p class="first">If you still don&#8217;t see the arrow symbols, please close all instances of
146+
your terminal emulator or gvim. You may also have to restart X for the
147+
changes to take effect.</p>
148+
</li>
149+
</ol>
150+
</div>
151+
<div class="section" id="os-x-and-windows">
152+
<h4>OS X and Windows<a class="headerlink" href="#os-x-and-windows" title="Permalink to this headline"></a></h4>
153+
<p>You&#8217;ll have to use a patched font to use the Powerline symbols. See
154+
<a class="reference internal" href="fontpatching.html#font-patching"><em>Font patching</em></a> for details on font patching and pre-patched fonts.</p>
155+
</div>
156+
</div>
99157
</div>
100158
<div class="section" id="usage">
101159
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline"></a></h2>
@@ -174,6 +232,11 @@ <h3><a href="index.html">Table Of Contents</a></h3>
174232
<li><a class="reference internal" href="#installation">Installation</a><ul>
175233
<li><a class="reference internal" href="#installing-with-pip">Installing with <tt class="docutils literal"><span class="pre">pip</span></tt></a></li>
176234
<li><a class="reference internal" href="#distribution-specific-packages">Distribution-specific packages</a></li>
235+
<li><a class="reference internal" href="#font-installation">Font installation</a><ul>
236+
<li><a class="reference internal" href="#linux">Linux</a></li>
237+
<li><a class="reference internal" href="#os-x-and-windows">OS X and Windows</a></li>
238+
</ul>
239+
</li>
177240
</ul>
178241
</li>
179242
<li><a class="reference internal" href="#usage">Usage</a><ul>

0 commit comments

Comments
 (0)