Поиск в Поддержке

Избегайте мошенников, выдающих себя за службу поддержки. Мы никогда не попросим вас позвонить, отправить текстовое сообщение или поделиться личной информацией. Сообщайте о подозрительной активности, используя функцию «Пожаловаться».

Learn More

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

  • 1 ответ
  • 2 имеют эту проблему
  • 19 просмотров
  • Последний ответ от 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; }

Все ответы (1)

more options

Изменено cor-el