2010-08-24 34 views
2

我在加載自定義字體的網站上遇到了一些問題。@ font-face問題

似乎在Chrome中工作,但是這是它...

https://andstones.site-ym.com/

我附上一個自定義樣式表,

<link charset="utf-8" type="text/css" href="http://www.korymathewson.com/fonts/styles.css" rel="stylesheet"> 

,並在樣式表我寫:

@font-face { 
    font-family: ChunkFiveRegular; 
    src: url('Chunkfive-webfont.eot'); 
    src: local('☺'), url('Chunkfive-webfont.woff') format('woff'), url('Chunkfive-webfont.ttf') format('truetype'), url('Chunkfive-webfont.svg#webfontb5K2fJwj') format('svg'); 
    font-weight: normal; 
    font-style: normal; 
} 

然後我稱之爲字體家族..

h1.fontface { 
    font: 60px/68px 'ChunkFiveRegular', Arial, sans-serif; 
    letter-spacing: 0; 
} 

p.style1, #MainMenu { 
    font: 18px/27px 'ChunkFiveRegular', Arial, sans-serif !important; 
} 

但它仍然不顯示在Firefox或IE ...任何幫助或建議,你可以借出?

+0

謝謝,我沒有注意到有向上箭頭和複選標記。欣賞的鈍性:) – Kory 2010-09-14 16:11:47

回答

4

Firefox只允許位於同一域的嵌入字體作爲請求它的站點。有一個(在某種程度上)的解決方法在這裏:

http://openfontlibrary.org/wiki/Web_Font_linking_and_Cross-Origin_Resource_Sharing

你可能想嘗試使用http://www.fontsquirrel.com/,讓您擁有自己嵌入到CSS的字體 - 非常有用!

希望這會有所幫助

+0

感謝您的解決方案。由於我沒有直接上傳文件訪問他們的遠程服務器,我最終同時使用了cufon作爲解決方法。 很好的答案btw。 – Kory 2010-09-01 06:11:51

2

什麼是92p?一個節點還是意味着是一個類? CSS class/id名稱不能以數字開頭。

+0

好抓,這是我的輸入錯誤,但實際的樣式表不包含92p ... 這是在上面的帖子中糾正。 字體的任何想法? – Kory 2010-08-26 05:56:48