<?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/category/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>
		<item>
		<title>Bluetooth Proximity</title>
		<link>http://blog.mayfounder.net/2008/11/11/bluetooth-proximity/</link>
		<comments>http://blog.mayfounder.net/2008/11/11/bluetooth-proximity/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 23:35:27 +0000</pubDate>
		<dc:creator>Ankit</dc:creator>
				<category><![CDATA[applescript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[adium]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[screensaver]]></category>
		<category><![CDATA[vlc]]></category>

		<guid isPermaLink="false">http://blog.mayfounder.net/2008/11/11/bluetooth-proximity/</guid>
		<description><![CDATA[Recently I stumbled across this awesome utility called Proximity. Its a neat small utility that detects if you are near your system or away from it. And it does this by checking the status of your bluetooth phone. Hence the range for away is about 30ft. This is a pretty useful thing. Couple of ideas [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I stumbled across this awesome utility called <a href="http://www.apple.com/downloads/macosx/system_disk_utilities/proximity.html">Proximity</a>. Its a neat small utility that detects if you are near your system or away from it. And it does this by checking the status of your bluetooth phone. Hence the range for away is about 30ft.</p>
<p>This is a pretty useful thing. Couple of ideas that come to my mind for its use are</p>
<ol>
<li>Use bluetooth to lock your computer</li>
<li>Use bluetooth to change Messenger Status</li>
<li>Use bluetooth to play/pause a movie</li>
<li>&#8230;</li>
</ol>
<p>Here is a list of AppleScripts for the ideas above<br />
<big><br />
Start Screensaver using AppleScript</big><br />
<code>try<br />
tell application id "com.apple.ScreenSaver.Engine" to launch<br />
end try</code><br />
<big>Stop ScreenSaver using AppleScript</big><br />
<code>try<br />
tell application id "com.apple.ScreenSaver.Engine" to quit<br />
end try</code><br />
Please note that if password on wake is set true then it will ask for password</p>
<p><big>Go Away in Adium using AppleScript</big><br />
<code>tell application "Adium" to go away</code><br />
<big>Available in Adium using AppleScript</big><br />
<code>tell application "Adium" to go away</code><br />
<big>Play and Pause VLC using AppleScript</big><br />
<code>tell application "VLC" to play</code><br />
The same script plays and pauses a file</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mayfounder.net/2008/11/11/bluetooth-proximity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

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

