@font-face declaration works on Firefox but not Safari/WebKit?
Question
The following @font-face declaration works perfectly well on Firefox (Mac) but not Safari/WebKit:
@font-face {
font-family:MyGaramond;
src:local("Garamond Premier Pro"), /* Full name */
local("GaramondPremrPro"), /* Postscript name */
url("GaramondPremrPro.otf") format("opentype"); /* Fallback */
}
h2 {
font-family:MyGaramond, sans-serif !important;
}
To clarify, I've also tried:
@font-face {
font-family:MyGaramond;
src:local("Garamond Premier Pro"), /* Full name */
local("GaramondPremrPro"), /* Postscript name */
url("GaramondPremrPro.otf"); /* Fallback */
}
h2 {
font-family:MyGaramond, sans-serif !important;
}
, with/without quotes, etc.
Has anyone else experienced this, and if so, how did you fix it? That this isn't working is really baffling (and a tad irritating...).
Solution
I think webkit still has some problems with opentype. How does opera handle it?
OTHER TIPS
I always use the @font-face Generator from font squirrel, never had any browser issues that way.
Check the site: http://www.fontsquirrel.com/fontface/generator
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow