<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Founder Blog &#187; code</title>
	<atom:link href="http://blog.mayfounder.net/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mayfounder.net</link>
	<description>Ideas, Code and rants</description>
	<lastBuildDate>Tue, 07 Jul 2009 21:56:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
		<item>
		<title>Adding a new TTF font to Linux</title>
		<link>http://blog.mayfounder.net/2009/02/10/adding-a-new-ttf-font-to-linux/</link>
		<comments>http://blog.mayfounder.net/2009/02/10/adding-a-new-ttf-font-to-linux/#comments</comments>
		<pubDate>Wed, 11 Feb 2009 07:01:20 +0000</pubDate>
		<dc:creator>Ankit</dc:creator>
				<category><![CDATA[code]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Font]]></category>

		<guid isPermaLink="false">http://blog.mayfounder.net/?p=23</guid>
		<description><![CDATA[One thing that keeps me doing development on a Mac OS X is its awesome Monaco font. I saw the font first time while using Mac in my college, and I fell in love with the font ( yeah, that sounds crazy&#8230; ). I prefer Monaco over very popular terminal fonts like courier or courier [...]]]></description>
			<content:encoded><![CDATA[<p>One thing that keeps me doing development on a Mac OS X is its awesome Monaco font. I saw the font first time while using Mac in my college, and I fell in love with the font ( yeah, that sounds crazy&#8230; ). I prefer Monaco over very popular terminal fonts like courier or courier new. Monaco is as crisp as courier and at the same time as sober as Helvetica.</p>
<p>Ok. Now to the main point.. I have been using Linux almost 10 years now. I remember from the initial days, adding a new TTF font in Linux; I always felt the steps to be too much cryptic.</p>
<p>After a long time today I found a seemless way to install a new TTF font.</p>
<p>And as Monaco is my favorite for terminal programs, I&#8217;ll show the steps using Monaco.</p>
<ol>
<li>Download a TTF font or fonts file. In case of Monaco just download it from <a href="http://www.gringod.com/wp-upload/software/Fonts/Monaco_Linux.ttf">here</a>.</li>
<li>Unzip, gunzip, untar, bunzip2 do whatever is required on the fonts file. For Monaco we do nothing.</li>
<li>Copy the .ttf file to a nice place.<br />
<code>$ sudo mkdir /usr/share/fonts/truetype<br />
$ sudo cp Monaco_Linux.ttf /usr/share/fonts/truetype/</code>
</li>
<li>Now we need to create required files for the new fonts ( i.e. <tt>fonts.scale</tt> and <tt>fonts.dir</tt> )<br />
<code>$ cd /usr/share/fonts/truetype<br />
$ sudo mkfontscale<br />
$ sudo mkfontdir</code></li>
<li>This creates the required files, now we need to add the fonts to cache. One way to do it is add to cache and restart X Font Server<br />
<code>$ sudo fc-cache<br />
$ sudo chkfontpath --add /usr/share/fonts/truetype<br />
$ sudo /etc/rc.d/init.d/xfs restart</code><br />
OR easy way to do it is refresh the cache forcefully. Which does not require restarting the server<br />
<code>$ sudo chkfontpath --add /usr/share/fonts/truetype<br />
$ sudo fc-cache -fv</code></li>
<li>Restart the program you want to use the font in.</li>
</ol>
<p>You can always copy the fonts in <tt>~/.fonts</tt> directory if you don&#8217;t have root access.</p>
<p>References and Resources:<br />
<a href="http://www.gringod.com/2006/11/01/new-version-of-monaco-font/">http://www.gringod.com/2006/11/01/new-version-of-monaco-font/</a><br />
<a href="http://vietunicode.sourceforge.net/howto/fontlinux.html">http://vietunicode.sourceforge.net/howto/fontlinux.html</a><br />
<a href="http://www.ehow.com/how_2266807_install-ttf-fonts-ubuntu.html">http://www.ehow.com/how_2266807_install-ttf-fonts-ubuntu.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mayfounder.net/2009/02/10/adding-a-new-ttf-font-to-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.377 seconds -->

