我已经为网站上的许多字体实现了@font-face。这是一个托管在 IIS7 上的 asp 网站。目前我正在使用 FF23、Chrome、IE8/9/10 进行测试。我对 IE 中的字体有一些困难。当我没有从我的服务器访问网页时,字体将在 FF 和 Chrome 上正确呈现,但在所有 IE 浏览器上它们不会。当我在服务器(2008 r2)上访问网站时,我使用的是相同的 URL(完全限定的域名)。当我不在服务器上访问时,我使用的是相同的完全限定域名。字体和网站都托管在同一台机器(同一域)上。@font-face 在 FF 或 Chrome 中没有抛出错误,不知道如何签入 ie。
@font-face {
font-family: 'sf_movie_posterregular';
src: url('./fonts/customtitle-webfont.eot');
src: url('./fonts/customtitle-webfont.svg#sf_movie_posterregular') format('svg'),
url('./fonts/customtitle-webfont.eot?#iefix') format('embedded-opentype'),
url('./fonts/customtitle-webfont.woff') format('woff'),
url('./fonts/customtitle-webfont.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}