2014-02-21 49 views
3

HTML爲什麼一個字體工作在IE,但其他沒有

<span style="font-family: 'blackjackregular'; font-size: 18pt;">My</span> 
<span style="font-family: 'trajanpro'; font-size: 14pt;">WEST</span> 

字體CSS:

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

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

IE顯示:

enter image description here

FF和Chrome展會:

enter image description here

正如你可以看到在IE和其他瀏覽器中,我是正確的,但爲什麼不是WEST不改變在IE中的字體?

+0

哪個版本的IE? – enguerranws

+0

IE版本8 ... – SearchForKnowledge

+0

這個問題表明,兩種字體中的一種可以工作,另一種不會,但不提供有關這兩種字體的任何真實信息,只是您在CSS中分配給它們的名稱。 –

回答

3

Trajan Pro是Adobe的專有字體,可能沒有將其嵌入爲Web字體的許可證。將其嵌入@font-face可能違反了EULA。要使用它,你需要使用Typekit這樣的服務。請點擊這裏查看詳細信息:https://typekit.com/fonts/trajan-pro-3

編輯:

一些挖這裏是一個有趣的link,稱IE瀏覽器實現了EOT文件限制使用字體的標誌之後。其他瀏覽器不實現此功能,或計劃,因此行爲上的差異。

+1

你是說Chrome會忽略許可證,但IE不? –

+0

不可能,是嗎? –

+0

我有一種感覺,因爲當試圖在一個網站轉換它不允許我,但另一個網站。 – SearchForKnowledge

2

似乎是IE應用字體的EOT標誌,而另一個瀏覽器則不適用,正如Jacek Glen所說。

您應該檢查免費等同於圖拉真,像Cinzelhttp://www.google.com/fonts/specimen/Cinzel

我不知道,但嘗試:

@font-face { 
font-family: 'trajanpro'; 

src: url('trajanpro-regular.eot?#iefix') format('embedded-opentype'), 
    url('trajanpro-regular.woff') format('woff'), 
    url('trajanpro-regular.ttf') format('truetype'), 
    url('trajanpro-regular.svg#trajanpro_regular') format('svg'); 
font-weight: normal; 
font-style: normal; 
} 

@font-face { 
font-family: 'blackjackregular'; 

src: url('blackjar-webfont.eot?#iefix') format('embedded-opentype'), 
    url('blackjar-webfont.woff') format('woff'), 
    url('blackjar-webfont.ttf') format('truetype'), 
    url('blackjar-webfont.svg#blackjackregular') format('svg'); 
font-weight: normal; 
font-style: normal; 
} 

我只是刪除了第一個 「源」 屬性,那不應該指定兩次。不知道爲什麼這將適用於「我的」,而不是「西部」...

+0

謝謝你的回答,但是這並沒有解決問題。我做了upvote的嘗試:) – SearchForKnowledge

+1

你應該免費檢查相當於Trajan,像Cinzel:http://www.google.com/fonts/specimen/Cinzel – enguerranws

+0

謝謝。這不是一樣的安靜:/ – SearchForKnowledge

相關問題