CSS Tips: @font-face – “src: local(‘?’)” smiley face’s meaning

Here is the excerpt from the gotcha by paul irish blog post:

Regarding @font-face syntax

I now recommend the bulletproof smiley variation over the original bulletproof syntax.

From the bulletproof post:

Yes, it’s a smiley face. The OpenType spec indicates any two-byte unicode characters won’t work in a font name on Mac at all, so that lessens the likelihood that someone actually released a font with such a name.

There are a few reasons why smiley is a better solution:

1. Webkit+Font Management software can mess up local references, like turning glyphs into A blocks.

2. On OS X, Font Management software may alter system settings to show a dialog when trying to access a local() font that’s accessible outside of Library/Fonts. More detail on my bulletproof post. Font Explorer X is also known to mess up other stuff in Firefox.

3. Although it’s unlikely, you could reference a local() font which is completely different than what you think it is. (Typophile post on different fonts, same name) At the very least its a risk, and you’re ceding control of the type to both the browser and host machine. This risk may not be worth the benefit of avoiding the font download.

These are all pretty edge case issues, but it’s worth considering.

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA