2012-06-27 51 views
-1

我在.NET應用程序中使用從Font Squirrel生成的@ font-face。字體在本地渲染效果很好。但是,在發佈應用程序時,它只能在服務器上的Chrome中運行,而不能在IE/Firefox中運行。我正在使用所有最新版本。@ font-face在IE中不工作,Firefox

我試着搞亂.htaccess文件&在Mime類型的服務器中添加.ot​​f,但我仍然有問題。

任何幫助將是偉大的。

+0

你有任何代碼可以顯示嗎? – Danny

+0

'@ font-face { font-family:'AsapRegular'; src:url('fonts/Asap-Regular-webfont.eot'); ('fonts/Asap-Regular-webfont.eot?#iefix')格式('embedded-opentype'), url('fonts/Asap-Regular-webfont.woff')格式('woff') ('fonts/Asap-Regular-webfont.svg#AsapItalic')格式('svg'); url('fonts/Asap-Regular-webfont.ttf')格式('truetype'), font-weight:normal; font-style:normal; }' – Jason

回答

0

我發現當通過Visual Studio發佈.NET應用程序時,它並沒有將12/16字體文件移動到服務器。我手動添加它們後,所有工作都很好。

0

這是我使用的字體面,如果這有助於格式:

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

這是我的代碼:

@font-face { 
font-family: 'AsapRegular'; 
src: url('fonts/Asap-Regular-webfont.eot'); 
src: url('fonts/Asap-Regular-webfont.eot?#iefix') format('embedded-opentype'), 
    url('fonts/Asap-Regular-webfont.woff') format('woff'), 
    url('fonts/Asap-Regular-webfont.ttf') format('truetype'), 
    url('fonts/Asap-Regular-webfont.svg#AsapItalic') format('svg'); 
font-weight: normal; 
font-style: normal; 

}

0

我想通了這個問題。當我通過Visual Studio發佈應用程序時,它沒有傳遞由字體生成器創建的12/16個字體文件。所以我把這些文件放在Windows服務器上。

現在一切都很正常。

相關問題