I've searched and searched to try and find an answer for this but can't seem to find the answer.
I was wondering if you use src: local()
I understand this checks to see if the user has the font installed first before downloading it right!?
However what I can't seem to find out is, when the font is downloaded for the first time, does this permanently store the font on the users computer (as in the user don't need to download it again next time) or does it get removed shortly after?
I'm wondering because it's unlikely people will have the font installed without them downloading it from the site and hence if it's not going to be stored for an extended period of time then I see no need to use src: local()
.
I'm also not sure if I do end up using src: local
if I should indeed be using the "smiley face" hack as well!?
Font Squirrel don't seem to use them, so I found that interesting.
The definition of src: local(...)
as given in the CSS3 Fonts draft refers to “a locally available copy” without additional clarifications. What apparently happens in practice – this can be tested rather simply – is that it needs to be an installed font, not a downloaded font, which should not even be expected to exist as a normal file in the system.
Quite independently of this, the font data is normally cached – but this means that the browser associates the URL of the font data with the data it has loaded. So within normal caching mechanisms, the browser does not need to reload the font data e.g. if the same downloadable font is used on different pages of a site and the user surfs around there.
Using src: local(...)
normally makes sense only as regards to the possibility that the user has actually downloaded a font (normally, from its download site) and installed it, to use it e.g. in a Word processor. So it might make sense if it’s a popular free font. When the local copy would be used independently of cache issues. There is, however, the possibility that the local copy is an older (or newer) version than your downloadable font.
The smiley hack is a confusing issue, but in this respect, I rely on FontSquirrel’s decision. They don’t use it any more, partly because it has been reported to cause problems in some Android versions, partly because they think they have a better hack; see their blog entry The New Bulletproof @Font-Face Syntax.