Are you sick and tired of boring, old web-safe fonts? For some time now, there are a couple of really quality solutions for their replacement. I believe Cufón is one of the most popular. This article will help you learn how to implement it in your Magento online store.
Follow these steps (and you might find white rabbit):
- Choose the font you want to use. Make sure the EULAs of these fonts allow Web Embedding.
- Go to Cufón website , upload you font, let the Cufón do its magic and download your .font.js file.
- While you’re there, download cufon-yui.js , you’ll need it too.
- Place downloaded files in js/cufon/ folder on your server.
- Open page.xml file of your theme and place this code inside your head section
<action method="addJs"><script>cufon/cufon-yui.js</script></action> <action method="addJs"><script>cufon/YourFontFile.font.js</script></action>
- Open head.phtml file of your theme and place this code right before the end of it.
Notice that this code will replace text inside h1 and h2 tags with custom font. You can target specific classes too if you need it, like this:
- Enjoy your custom typography!!