Przeszukaj pomoc

Unikaj oszustw związanych z pomocą.Nigdy nie będziemy prosić Cię o dzwonienie na numer telefonu, wysyłanie SMS-ów ani o udostępnianie danych osobowych. Zgłoś podejrzaną aktywność, korzystając z opcji „Zgłoś nadużycie”.

Learn More

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

  • 1 odpowiedź
  • 2 osoby mają ten problem
  • 19 wyświetleń
  • Ostatnia odpowiedź od 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; }

Wszystkie odpowiedzi (1)

more options

Zmodyfikowany przez cor-el w dniu