<?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>Aaron Mentele &#187; @font-face</title>
	<atom:link href="http://aaronmentele.com/tag/font-face/feed/" rel="self" type="application/rss+xml" />
	<link>http://aaronmentele.com</link>
	<description>personal blog of Aaron Mentele, web developer and partner at Electric Pulp</description>
	<lastBuildDate>Sun, 15 Jan 2012 20:09:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Melting</title>
		<link>http://aaronmentele.com/2009/12/10/melting/</link>
		<comments>http://aaronmentele.com/2009/12/10/melting/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 04:15:38 +0000</pubDate>
		<dc:creator>Aaron Mentele</dc:creator>
				<category><![CDATA[Geek]]></category>
		<category><![CDATA[@font-face]]></category>
		<category><![CDATA[fontsquirrel]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[modernizr]]></category>

		<guid isPermaLink="false">http://aaronmentele.com/?p=847</guid>
		<description><![CDATA[I&#8217;ve been coding a bastardized form of html5 for a while now. Basically it&#8217;s been xhtml 1.0 with a nicer doctype and div ids and classes paying tribute to proposed element names. It&#8217;s easy to blame browser compatibility for the frankenstein approach since getting IE to even recognize the new html5 elements in the first [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been coding a bastardized form of html5 for a while now. Basically it&#8217;s been xhtml 1.0 with a nicer doctype and div ids and classes paying tribute to proposed element names. </p>
<p>It&#8217;s easy to blame browser compatibility for the frankenstein approach since getting IE to even recognize the new html5 elements in the first place means running <a href="http://code.google.com/p/html5shiv/" title="html5 shiv">a script</a> to <em>create</em> them. And then you have to run the DOM in FF 2 and Camino 1 to keep them from closing elements improperly.</p>
<p>Requiring javascript just to make html <em>work</em> in these browsers seems self-serving, at best. But it starts to feel a lot less selfish when the client needs full control over heavily styled font. By working to avoid shocking browsers into handling html5 components and using @font-face, you&#8217;re simply avoiding one hack by implementing another. For us, the <em>another</em> hack has been <a href="http://wiki.novemberborn.net/sifr/">sIFR</a>.</p>
<p>The side effects of sIFR are such that alternate font replacement solutions like <a href="http://typekit.com">Typekit</a> and <a href="http://kernest.com">Kernest</a> start to look really good, regardless of any required javascript. And if they look really good, why not just hit <a href="http://fontsquirrel.com">Font Squirrel</a> and deliver your own fonts, right? Right.</p>
<p>We decided to use @font-face on a project early enough to actually get the web-licensable fonts into photoshop from the outset. This instead of searching for a font that looked like Gotham after the fact. (I&#8217;m kidding about Gotham. Kind of.) @font-face implementation was simple &#8211; <a href="http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/">Paul Irish&#8217;s recommendations</a> had made it into the Font Squirrel kits by the time I&#8217;d read it, making it all incredibly fast and simple. </p>
<p>We had a problem, though, with the fonts we were using. Being able to fall back to a web safe font in the stack is great so long as it&#8217;s similar to the one above it. Ours wasn&#8217;t &mdash; the intended font is significantly narrower than any web safe font, so in order to fall back to a readable alternative, we needed to reduce its font-size. In a second instance, we wanted a heavier font-weight for the web safe alternative. The font-family stack wasn&#8217;t enough.</p>
<p>I&#8217;d actually forgotten about <a href="http://modernizr.com">Modernizr</a> and was gagging on jquery browser sniffing when <a href="http://jdbartlett.com" rel="friend met colleague">Joe</a> reminded me. Modernizr allows you to specify alternate attributes for each instance (e.g., section h1 {} and .no-fontface section h1 {}) on any browser unable to render @font-face rather than having to detect user agents and then deliver alternate style sheets. As a bonus, it does the work the html5 shiv script I linked to above does, allowing us to knock down two birds with one stone and use actual html5 elements like header, nav, section, etc.</p>
<p>So now our build has valid html5 components and first choice fonts without requiring a bunch of hacks, and I have yet to find a single browser that chokes on the code. We&#8217;re still weeks out from launch and have a good deal of testing yet to complete, but the recent changes to Font Squirrel kits and now Modernizr have taken care of any significant reservation I had, at least for this project.</p>
<p>I probably could&#8217;ve sunk this entire post by tweeting a suggestion to spend 20 minutes familiarizing / re-familiarizing yourselves with both <a href="http://fontsquirrel.com">Font Squirrel</a> and <a href="http://modernizr.com">Modernizr</a> and then maybe followed up asking how many of you employed html5 and/or @font-face for client work. But, I felt like typing. And, I have trouble avoiding vague references to movies older than half the population on twitter.</p>
<p>What do you think? <a href="http://twitter.com/aaronmentele">You can twitter your words at me, too.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://aaronmentele.com/2009/12/10/melting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

