Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

Learn More

Fonts loaded from another site using @font-face do not display

  • 1 réponse
  • 2 ont ce problème
  • 19 vues
  • Dernière réponse par cor-el

more options

When loading a font using @font-face in CSS, the font displays correctly if the font file is local to the web site. If loading the font from another web site, the font file is loaded (as displayed by firebug and by server logs), but the font is not rendered.

I.e. : this works @font-face{ font-family:'HelveticaNeueUltlt'; src:url('/fonts/HelveticaNeueUltlt.eot'); src:url('/fonts/HelveticaNeueUltlt.eot?#iefix') format('embedded-opentype'), url('/fonts/HelveticaNeueUltlt.woff') format('woff'), url('/fonts/HelveticaNeueUltlt.ttf') format('truetype'), url('/fonts/HelveticaNeueUltlt.svg#HelveticaNeueUltlt') format('svg'); font-weight:normal; font-style:normal; }

But this doesn't work : @font-face{ font-family:'HelveticaNeueUltlt'; src:url('http://s3.mycompany.com/fonts/HelveticaNeueUltlt.eot'); src:url('http://s3.mycompany.com/fonts/HelveticaNeueUltlt.eot?#iefix') format('embedded-opentype'), url('http://s3.mycompany.com/fonts/HelveticaNeueUltlt.woff') format('woff'), url('http://s3.mycompany.com/fonts/HelveticaNeueUltlt.ttf') format('truetype'), url('http://s3.mycompany.com/fonts/HelveticaNeueUltlt.svg#HelveticaNeueUltlt') format('svg'); font-weight:normal; font-style:normal; }

When loading a font using @font-face in CSS, the font displays correctly if the font file is local to the web site. If loading the font from another web site, the font file is loaded (as displayed by firebug and by server logs), but the font is not rendered. I.e. : this works @font-face{ font-family:'HelveticaNeueUltlt'; src:url('/fonts/HelveticaNeueUltlt.eot'); src:url('/fonts/HelveticaNeueUltlt.eot?#iefix') format('embedded-opentype'), url('/fonts/HelveticaNeueUltlt.woff') format('woff'), url('/fonts/HelveticaNeueUltlt.ttf') format('truetype'), url('/fonts/HelveticaNeueUltlt.svg#HelveticaNeueUltlt') format('svg'); font-weight:normal; font-style:normal; } But this doesn't work : @font-face{ font-family:'HelveticaNeueUltlt'; src:url('http://s3.mycompany.com/fonts/HelveticaNeueUltlt.eot'); src:url('http://s3.mycompany.com/fonts/HelveticaNeueUltlt.eot?#iefix') format('embedded-opentype'), url('http://s3.mycompany.com/fonts/HelveticaNeueUltlt.woff') format('woff'), url('http://s3.mycompany.com/fonts/HelveticaNeueUltlt.ttf') format('truetype'), url('http://s3.mycompany.com/fonts/HelveticaNeueUltlt.svg#HelveticaNeueUltlt') format('svg'); font-weight:normal; font-style:normal; }

Toutes les réponses (1)

more options

Modifié le par cor-el