2010-02-19 7 views
0

La déclaration suivante @ font-face fonctionne parfaitement bien sur Firefox (Mac), mais pas Safari/WebKit:La déclaration @ font-face fonctionne sur Firefox mais pas sur 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; 
} 

Pour clarifier les choses, j'ai aussi essayé:

@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; 
} 

, avec/sans citations, etc.

Quelqu'un d'autre a-t-il vécu cela, et si oui, comment l'avez-vous réparé? Que cela ne fonctionne pas est vraiment déroutant (et un peu irritant ...).

+0

Essayé le code top ici dans un .html simple et rapide que j'ai fait et il a bien fonctionné dans Sarafi 4.0.4 sous Windows. –

Répondre

0

Je pense que webkit a encore quelques problèmes avec opentype. Comment l'opéra le gère-t-il?

+0

L'opéra fonctionne bien aussi. – Michael

+0

Peu importe. Je ne savais pas quel était le problème, mais j'ai utilisé TrueType Pro pour convertir OpenType en OpenType et maintenant cela fonctionne très bien. Peut-être que c'était un fichier mal formé. – Michael