<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-us"><generator uri="https://gohugo.io/" version="0.101.0">Hugo</generator><title type="html">font on A Scripter's Notes</title><subtitle type="html">Emacs, scripting and anything text oriented.</subtitle><link href="https://scripter.co/categories/font/" rel="alternate" type="text/html" title="HTML"/><link href="https://scripter.co/categories/font/index.xml" rel="alternate" type="application/rss+xml" title="RSS"/><link href="https://scripter.co/categories/font/atom.xml" rel="self" type="application/atom+xml" title="Atom"/><link href="https://scripter.co/categories/font/jf2feed.json" rel="alternate" type="application/jf2feed+json" title="jf2feed"/><updated>2026-04-22T08:24:57-04:00</updated><author><name>Kaushal Modi</name><email>kaushal.modi@gmail.com</email></author><id>https://scripter.co/categories/font/</id><entry><title type="html">Installing custom fonts in Linux</title><link href="https://scripter.co/installing-custom-fonts-in-linux/?utm_source=atom_feed" rel="alternate" type="text/html"/><id>https://scripter.co/installing-custom-fonts-in-linux/</id><published>2014-03-27T13:42:19-04:00</published><updated>2014-03-27T13:42:19-04:00</updated><content type="html"><![CDATA[<p>I&rsquo;ll step through how to set custom fonts for xterm terminal. My default shell is <code>tcsh</code>.</p>
<ol>
<li>Create a folder <code>.fonts</code> in your $HOME directory.</li>
<li>Download fonts of your choice (<strong>ttf</strong> or <strong>otf</strong> format to ~/.fonts).</li>
<li>Refresh the fonts cache with <code>fc-cache -fv</code>.</li>
<li>You can verify if your custom fonts got added to the cache using <code>fc-list</code>. For example, I would do <code>fc-list -f &quot;%{family}\n&quot; | sort -u | grep 'Inconsolata'</code><sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup> to check if my downloaded Inconsolata fonts got into the font cache.</li>
<li>Add the below .Xdefaults snippet to your <code>~/.Xdefaults</code></li>
<li>Add <code>xrdb -merge $HOME/.Xdefaults</code> to your shell init script. <em>My shell init script is <code>~/.alias</code></em>.</li>
</ol>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">*customization: -color
</span></span><span class="line"><span class="cl">XTerm*termName: xterm-256color
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">xterm*saveLines:        500
</span></span><span class="line"><span class="cl">xterm*scrollBar:        false
</span></span><span class="line"><span class="cl">xterm*cursorColor:      white
</span></span><span class="line"><span class="cl">xterm*pointerColor:     white
</span></span><span class="line"><span class="cl">xterm*Foreground:       white
</span></span><span class="line"><span class="cl">xterm*Background:       black
</span></span><span class="line"><span class="cl">xterm*c132:             true
</span></span><span class="line"><span class="cl">xterm*loginShell:       false
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">! Fonts
</span></span><span class="line"><span class="cl">! XTerm*faceName: DejaVu Sans Mono:size=11
</span></span><span class="line"><span class="cl">! XTerm*faceName: Inconsolata:size=11
</span></span><span class="line"><span class="cl">! XTerm*faceName: Inconsolata\\-dz:style=dz:size=11
</span></span><span class="line"><span class="cl">XTerm*faceName: Inconsolata\\-g:style=g:size=11
</span></span></code></pre></div><p>Done! Now source your shell init script and launch <code>xterm</code>.</p>
<p><strong>Note</strong>: In order to use font names with hyphens in them, I had to escape them by using <code>\\</code>. So for the <code>Inconsolata-g</code> font, I have <code>XTerm*faceName: Inconsolata\\-g:style=g:size=11</code>.</p>
<p>It might be helpful to add the below aliases to your tcsh init script for quick font refresh and check, using <code>fontsrefresh; fontsavail | grep 'Inconsolata'</code>.</p>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-tcsh" data-lang="tcsh"><span class="line"><span class="cl"><span class="nb">alias </span>fontsavail   <span class="s1">&#39;fc-list -f &#34;%{family}\n&#34; | sort -u&#39;</span>
</span></span><span class="line"><span class="cl"><span class="nb">alias </span>fontsrefresh <span class="s1">&#39;fc-cache -fv&#39;</span>
</span></span></code></pre></div><div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>You can download Inconsolata font from <a href="http://levien.com/type/myfonts/inconsolata.html">here</a>.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>]]></content><category scheme="https://scripter.co/categories/font" term="font" label="font"/><category scheme="https://scripter.co/categories/linux" term="linux" label="linux"/><category scheme="https://scripter.co/categories/xterm" term="xterm" label="xterm"/><category scheme="https://scripter.co/categories/tcsh" term="tcsh" label="tcsh"/></entry></feed>