2012-12-26 50 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