2012-12-26 55 views
1

我想加載日記字體,但無論出於什麼奇怪的原因,它不會加載。CSS字體將不會加載

@font-face { 
    font-family: Brandon Grotesque; 
    src: url(/addons/shared_addons/themes/axium/fonts/brandon-grotesque.ttf) format("truetype"); 
} 

@font-face { 
    font-family: Journal; 
    src: url(/addons/shared_addons/themes/axium/fonts/journal.ttf) format("ttf"); 
} 

body { 
    font-family: Journal; 
} 

布蘭登怪誕的作品,但雜誌犯規

我下載了它:http://www.dafont.com/journal.font

任何幫助嗎?

回答

4

在端部的格式標識符是錯誤的:

format("ttf"); 

應當format("truetype"),像布蘭登怪誕。

2

首先,TTF更改爲TrueType字體:

src: url(/addons/shared_addons/themes/axium/fonts/brandon-grotesque.ttf) format("truetype"); 

然後確保它在通過檢查開發者工具(在Chrome F12)在正確的地方enter image description here

什麼是更多,你必須知道並不是每一個瀏覽器支持TTF格式,你可以看看這裏: http://caniuse.com/ttf

也,你需要知道的字體在Windows渲染不同,MacOS的/ Linux和字體可能看起來不像APPE在windows下使用chrome,在macos/linux中使用chrome