Today I finally got around to implementing Typekit on digitalformula.net.  It’s something I’ve been meaning to do for ages but because of other commitments I just haven’t had time.

Anyway, I use ExpressionEngine to publish this site and a local build of Debian Linux to develop the site with.  Because I have a ‘Portfolio’ account on Typekit it means I can have unlimited sites, unlimited fonts per kit and access to the entire font library.  I tried cufón a while ago but had mixed results whereas Typekit kinda just works.  Yes, yes, cufón is great but personally I prefer Typekit.  🙂

Because of the two build environments it means that the Portfolio license can be used to create two different kits and that means telling ExpressionEngine which kit to load.  I have the following code in the section of this site and it works perfectly.

[code lang=”php”]
<?php
if (strpos($_SERVER["SERVER_NAME"], "local"))
{
?>
<!– typekit – dev –>

try{Typekit.load();}catch(e){}
<?php
}
else
{
?>
<!– typekit – live –>

try{Typekit.load();}catch(e){}
<?php
}
?>
[/code]

Just replace [dev kit code] and [live kit code] with your own codes and you’re good to go.  Super simple and super effective.