Empty local font reference, i.e. local('')

Just trying to get some clarification on this as I can't get my head around the Mozilla docs. I've always assumed that with an empty local source i.e. src: local(''), url('...') the font uses the URL succeeding that in the property list. For example I thought:
src: local(''),
url('/fonts/source-sans-pro-v21-latin-300.eot
src: local(''),
url('/fonts/source-sans-pro-v21-latin-300.eot
Would skip the local and then load the font from the /fonts directory listed in the URL. However, I'm wondering if this is correct and if / or the browser does something intelligent based on the font family and font weight that I don't know about. Examples of empty local font-src declarations here https://github.com/search?q=fonts%2Fsource-sans-pro-v21-latin-300&type=code (further making me more confused was a PR on some project saying remove the local('') as it was loading someone's funky local fonts.
1 Reply
ἔρως
ἔρως15mo ago
it actually first tries to load a font called '' and then tries to use the url that's an empty string https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face#description <-- this explains it, and doesn't mention anything about the length of the string, so, an empty string is a valid local('') name https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/src#localfont-face-name <-- here also doesn't say anything specific about an empty string
Want results from more Discord servers?
Add your server