<?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>Eirik Stavem - to whom it may concern... &#187; Apple</title>
	<atom:link href="http://www.eiriks.net/category/apple/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.eiriks.net</link>
	<description>to whom it may concern...</description>
	<lastBuildDate>Mon, 07 Sep 2009 12:30:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Design is&#8230;</title>
		<link>http://www.eiriks.net/2009/03/21/design-is/</link>
		<comments>http://www.eiriks.net/2009/03/21/design-is/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 11:30:32 +0000</pubDate>
		<dc:creator>Eirik</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Misc]]></category>

		<guid isPermaLink="false">http://www.eiriks.net/?p=638</guid>
		<description><![CDATA[For someone who is increasingly interested in and concerned with user interfaces, specifically user interfaces for web applications, this quote from Steve Jobs in 2003 sums it up nicely: Most people make the mistake of thinking design is what it looks like. People think it’s this veneer — that the designers are handed this box [...]]]></description>
			<content:encoded><![CDATA[<p>For someone who is increasingly interested in and concerned with user interfaces, specifically user interfaces for web applications, this quote from Steve Jobs in 2003 sums it up nicely:</p>
<blockquote><p>Most people make the mistake of thinking design is what it looks like. People think it’s this veneer — that the designers are handed this box and told, ‘Make it look good!’ That’s not what we think design is. It’s not just what it looks like and feels like. Design is how it works.</p></blockquote>
<p>(via <a href="http://daringfireball.net/">Daring Fireball</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eiriks.net/2009/03/21/design-is/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iMac turns 10!</title>
		<link>http://www.eiriks.net/2008/05/07/imac-turns-10/</link>
		<comments>http://www.eiriks.net/2008/05/07/imac-turns-10/#comments</comments>
		<pubDate>Wed, 07 May 2008 07:52:34 +0000</pubDate>
		<dc:creator>Eirik</dc:creator>
				<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://www.eiriks.net/blog/?p=10</guid>
		<description><![CDATA[Yesterday marked the tenth &#8220;birthday&#8221; of the iMac! I&#8217;m the proud owner of a 24&#8243; iMac, and it&#8217;s by far my favourite gadget. It&#8217;s a good performer, it looks good, takes up hardly any space on my desk, takes up absolutely no space on the floor next to my desk, it&#8217;s quiet &#8211; and did [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday marked the <a href="http://www.tuaw.com/2008/05/06/imac-turns-10/">tenth &#8220;birthday&#8221; of the iMac</a>! I&#8217;m the proud owner of a 24&#8243; iMac, and it&#8217;s by far my favourite gadget. It&#8217;s a good performer, it looks good, takes up hardly any space on my desk, takes up absolutely no space on the floor next to my desk, it&#8217;s quiet &#8211; and did I mention it looks good?</p>
<p>The only thing I&#8217;m missing from my setup now, is an iPhone, and I&#8217;ll be really happy and content &#8211; until Apple releases yet another must-have gadget, that is&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eiriks.net/2008/05/07/imac-turns-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom font with FPDF on OS X &#8211; ttf2pt1, fondu</title>
		<link>http://www.eiriks.net/2007/09/13/custom-font-with-fpdf-on-os-x-ttf2pt1-fondu/</link>
		<comments>http://www.eiriks.net/2007/09/13/custom-font-with-fpdf-on-os-x-ttf2pt1-fondu/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 08:37:08 +0000</pubDate>
		<dc:creator>Eirik</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.eiriks.net/blog/?p=39</guid>
		<description><![CDATA[Creating a PDF with a custom font through PHP and the nice FPDF-library is a straight-forward task &#8211; if you have the font available as TrueType. If you &#8211; like me &#8211; are working on a Mac, it&#8217;s more likely that your fonts are in any format but TrueType, so you need to convert them first, [...]]]></description>
			<content:encoded><![CDATA[<p>Creating a PDF with a custom font through PHP and the nice <a href="http://www.fpdf.org/">FPDF</a>-library is a straight-forward task &#8211; if you have the font available as TrueType. If you &#8211; like me &#8211; are working on a Mac, it&#8217;s more likely that your fonts are in any format but TrueType, so you need to convert them first, and generate the font metrics description file. That&#8217;s where my problems began.</p>
<p>FPDF comes with a tool (makefont.php) to create the necessary files and maps based on a TrueType-font, so I just needed something to help me convert my fonts to TrueType. My fonts are almost all Postscript Type 1 (LWFN), so I found <a href="http://fondu.sourceforge.net/">fondu</a> to be an appropriate tool. To generate the font metrics description file (.afm), <a href="http://ttf2pt1.sourceforge.net/">ttf2pt1</a> was suggested as the best option.</p>
<p>So, the strategy is (assuming you already have FPDF (I used version 1.53) ready to use on your webserver):<br />
1. Use fondu to convert ScalaSanReg (LWFN font file that resides in /Users/eirik/Desktop) to TrueType (using the proper encoding, in my case latin1 (ISO-8859-1)).<br />
2. Realize that you need <a href="http://darwinports.com/">DarwinPorts</a> to easily install ttf2pt1, <a href="http://darwinports.com/download/">download</a> and install DarwinPorts.<br />
3. Use ttf2pt1 to generate the font metrics description file.<br />
4. Use the makefont.php-script that comes with FPDF to generate the font definition file that FPDF needs, as well as a compressed font file.<br />
5. Declare and use the font in a PHP-script that creates a dynamic PDF with FPDF.</p>
<p>Here&#8217;s a description of the solutions that worked for me:<br />
1. Downloading and installing fondu was easy, just download and run the package. Then open a terminal window and run:</p>
<pre>cd /Users/eirik/Desktop &lt;-- the location of your font
fondu -latin1 ScalaSanSpaReg</pre>
<p>This worked first time, and resulted in a new TrueType file called ScalaSans-Regular.pfb.</p>
<p>2. Now to create the font metrics description file (.afm), we need to install ttf2pt1. The easiest way to do this is to use DarwinPorts. There is only one hitch. You need Xcode installed first. I ran into all kinds of trouble because I didn&#8217;t have Xcode installed, so make sure it&#8217;s installed. If it isn&#8217;t, insert &#8220;Mac OS X Install Disc 1&#8243; that came with your computer, and run /Xcode Tools/XcodeTools.mpkg (valid for 10.4, not sure if this is correct for older versions). This will install what you need. Now that you have Xcode, installing DarwinPorts should work like a charm, just <a href="http://darwinports.com/download/">download the package</a> and run it. After completing the install, you need to run an update to make sure you have the current ports in your list. In your terminal window:</p>
<pre>sudo port -d selfupdate</pre>
<p>If you get a &#8220;command not found&#8221; error, you probably don&#8217;t have the location of port in your PATH. On my computer, port was installed in /opt/local/bin, so I had to run this in a terminal window:</p>
<pre>export PATH="/opt/local/bin:$PATH"</pre>
<p>After doing this you have to close your terminal window and open a new one to use the updated PATH, and you should be able to run the update successfully:</p>
<pre>sudo port -d selfupdate</pre>
<p>I had to do this several times because it seemed that rsync was timing out occasionally, so keep running the command until you see something like &#8220;Congratulations, you have successfully installed the MacPorts system.&#8221;.</p>
<p>3. We can now install ttf2pt1 (note that the path I first change to in the terminal commands may be different on your computer, run a spotlight-search for ttf2pt1 to find the correct location):</p>
<pre>cd /opt/local/var/macports/sources/
          rsync.macports.org/release/ports/print/ttf2pt1
sudo port install ttf2pt1</pre>
<p>This will check for dependencies and install everything you need to run ttf2pt1 (zlib and freetype). ttf2pt1 will be installed in the same location as port, so if you updated your PATH previously, you should now be able to generate the font metrics description file (.afm) with this command:</p>
<pre>cd /Users/eirik/Desktop &lt;-- the location of your ttf-file
ttf2pt1 -a -l latin1 ScalaSans-Regular.pfb scalasans</pre>
<p>This resulted in two files: ScalaSans-Regular.afm, and ScalaSans-Regular.t1a, but we only need the .afm-file.</p>
<p>4. We now have the two files needed to use makefont.php to generate the font definition file and compressed font:<br />
- ScalaSans-Regular.pfb (the TrueType font file)<br />
- ScalaSans-Regular.afm (the font metrics description file)</p>
<p>Now, copy both files into the &#8220;fpdf/tutorial&#8221;-folder that also contains a file called makefont.php. Edit makefont.php, it should look something like this (again, I&#8217;m using the latin1-encoding, this may be different for you &#8211; the default for the script is cp1252):</p>
<pre>require('../font/makefont/makefont.php');
MakeFont('ScalaSans-Regular.pfb',
          'ScalaSans-Regular.afm','ISO-8859-1');</pre>
<p>Running the script from your browser (e.g. http://localhost/fpdf/tutorial/makefont.php) will result in two files inside the &#8220;tutorial&#8221;-folder:<br />
- ScalaSans-Regular.php (the font definition file)<br />
- ScalaSans-Regular.z (the compressed font)<br />
Copy these files to the &#8220;fpdf/font&#8221;-folder (if you can&#8217;t find ScalaSans-Regular.z, use ScalaSans-Regular.pfb instead), and you&#8217;re ready to use the font in your script.</p>
<p>5. Here&#8217;s an example of how you can use a custom font with FPDF (assuming this new file is located in the fpdf-folder, at the same level as fpdf.php):</p>
<pre>require('fpdf.php');

$pdf = new FPDF('P','mm','a4');
$pdf-&gt;AddFont('ScalaSans-Regular', '',
          'ScalaSans-Regular.php');
$pdf-&gt;AddPage();
$pdf-&gt;SetFont('ScalaSans-Regular', '', 12);
$pdf-&gt;SetXY(60, 60);
$pdf-&gt;MultiCell(120, 5,
          'This is a test with ScalaSans-Regular');
$pdf-&gt;Output('custom_font_test.pdf', 'D');</pre>
<p>I hope this will some day be of help to someone, otherwise I mainly regard this as a checklist for myself if I ever re-install the OS on this computer&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eiriks.net/2007/09/13/custom-font-with-fpdf-on-os-x-ttf2pt1-fondu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Coda improves my workflow</title>
		<link>http://www.eiriks.net/2007/06/06/coda-improves-my-workflow/</link>
		<comments>http://www.eiriks.net/2007/06/06/coda-improves-my-workflow/#comments</comments>
		<pubDate>Wed, 06 Jun 2007 09:19:27 +0000</pubDate>
		<dc:creator>Eirik</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.eiriks.net/blog/?p=45</guid>
		<description><![CDATA[Having used Coda for about two weeks now (I bought a copy last week), there&#8217;s one thing I suddenly noticed today: it&#8217;s no longer as much of a hassle to switch between projects as it used to be. To explain: previously, when working on a project, I would have BBEdit open with several different files, [...]]]></description>
			<content:encoded><![CDATA[<p>Having used Coda for about two weeks now (I bought a copy last week), there&#8217;s one thing I suddenly noticed today: it&#8217;s no longer as much of a hassle to switch between projects as it used to be.</p>
<p>To explain: previously, when working on a project, I would have BBEdit open with several different files, a Finder-window with all files, a Transmit-session to the webserver via FTP, and a Terminal-window with SSH to the webserver. These would all be &#8220;customized&#8221; to that particular project. If I had to switch to a different project for just a short while, it meant duplicating windows to open the same ones with files and content for the other project etc etc.</p>
<p>With Coda, I hit Cmd+1 to go to the sites-pane, doubleclick the site/project I want to switch to, and voila! All the files I previously had open for that site/project opens up in the same order on the tab bar, Transmit Turbo connects to my FTP-server, the SSH-pane is ready to connect, and the sidebar opens a &#8220;Finder&#8221;-window in the correct location for my local files.</p>
<p>The beauty of web development software created by web developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eiriks.net/2007/06/06/coda-improves-my-workflow/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>MacBook Pro</title>
		<link>http://www.eiriks.net/2007/01/24/macbook-pro/</link>
		<comments>http://www.eiriks.net/2007/01/24/macbook-pro/#comments</comments>
		<pubDate>Wed, 24 Jan 2007 09:20:02 +0000</pubDate>
		<dc:creator>Eirik</dc:creator>
				<category><![CDATA[Apple]]></category>

		<guid isPermaLink="false">http://www.eiriks.net/blog/?p=56</guid>
		<description><![CDATA[Yesterday I received my shiny new MacBook Pro, and it is greeeeeat! I spent most of last evening and night setting it up, and I thought I&#8217;d post some notes on the whole process here, with some info about the applications I use most frequently. After finishing the initial setup through Apple&#8217;s simple and intuitive [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I received my shiny new MacBook Pro, and it is greeeeeat! I spent most of last evening and night setting it up, and I thought I&#8217;d post some notes on the whole process here, with some info about the applications I use most frequently.</p>
<p>After finishing the initial setup through Apple&#8217;s simple and intuitive step-by-step installer, I started installing myÂ <a href="http://osx.iusethis.com/user/eistav">favourite applications</a>:</p>
<p>-Â <a href="http://quicksilver.blacktree.com/">Quicksilver</a>: you just can&#8217;t live without this application. I always hide the dock to use the full 900 pixel height for my application windows, and use Ctrl-Space to launch all applications and run AppleScripts etc. I always set it up to start at launch, and only show in the menu bar, not the dock.</p>
<p>-Â <a href="http://www.opera.com/">Opera</a>: never leave home without it. Some tweaking here and there to get things looking the way I like, and setting up email- and IRC-accounts.</p>
<p>-Â <a href="http://www.barebones.com/products/bbedit/">BBEdit</a>: my favourite editor when doing web development of any kind. No big changes to the defaults, just turning on line numbers and other minor changes. The only thing I dislike about BBEdit is the icon, so I always head over toÂ <a href="http://www.hicksdesign.co.uk/">Jon Hicks</a>Â to downloadÂ <a href="http://www.hicksdesign.co.uk/journal/bare-bones-means-comic-sans">his excellent icon</a>Â and replace the old ugly one.</p>
<p>-Â <a href="http://en.wikipedia.org/wiki/Subversion_(software)">Subversion</a>: one of the reasons I got a laptop, is that I&#8217;m going to start working on some rather time consuming development projects for work, which also means I&#8217;ll need a good version control system. SVN to the rescue! Installing it on OS X was a great deal easier than I thought it would be:<br />
1. Download and install latest version of Subversion for OS X fromÂ <a href="http://www.codingmonkeys.de/mbo/">Martin Ott</a>.<br />
2. Tell your bash shell where to look for Subversion, to make life easier if you&#8217;ll be using it from the Terminal, so start your Terminal and type</p>
<pre>pico .bash_profile</pre>
<p>Paste the following line into the file:</p>
<pre>export PATH=/usr/local/bin:$PATH</pre>
<p>Hit Ctrl-X, then type Y and hit enter. Now restart your terminal or type:</p>
<pre>. .bash_profile</pre>
<p>then hit enter, and you should be ready to go.<br />
3. I&#8217;m not that familiar with all the Subversion-commands, so I also installedÂ <a href="http://www.lachoseinteractive.net/en/community/subversion/svnx/features/">svnX</a>, which is a frontend for Subversion. I wasn&#8217;t all that impressed with the usability of svnX, and had some problems checking out my repositories on myÂ <a href="http://www.dreamhost.com/r.cgi?53583">Dreamhost</a>Â account, but I eventually got it working.</p>
<p>-Â <a href="http://www.adiumx.com/">Adium</a>: I&#8217;ve been using MSN Messenger for several years on Windows, but since there is no decent native client for OS X, I use Adium, with the followingÂ <a href="http://www.adiumxtras.com/">Xtras</a>:<br />
*Â <a href="http://www.adiumxtras.com/index.php?a=xtras&amp;xtra_id=851">AdiuMSN</a>Â emoticons<br />
*Â <a href="http://www.adiumxtras.com/index.php?a=xtras&amp;xtra_id=1495">Decay</a>Â color theme and list layout, setting window style to borderless window and opacity to 60-70%, this looks really nice and integrates well into my desktop.<br />
*Â <a href="http://www.adiumxtras.com/index.php?a=xtras&amp;xtra_id=1963">iBubble</a>Â status icons<br />
*Â <a href="http://www.adiumxtras.com/index.php?a=xtras&amp;xtra_id=2404">iAdiumBubble 2</a>Â dock icons</p>
<p>After installing Adium, and setting the opacity of the main window to 60%, I headed over toÂ <a href="http://www.veer.com/ideas/wallpaper/">Veer</a>Â to pick up a nice wallpaper, and then installed some of my otherÂ <a href="http://osx.iusethis.com/user/eistav">favourite applications</a>. I&#8217;m constantly on the lookout for good software for OS X, so please let me know if you have any tips.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.eiriks.net/2007/01/24/macbook-pro/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

