【发布时间】:2012-08-16 20:47:29
【问题描述】:
我不确定这是否是发布此内容的正确位置,因为我不知道问题出在哪里。基本上字体现在对我来说真的很痛苦,而且没有任何效果。我尝试从 google-fonts 加载字体并遇到 IE 问题,所以我决定自己下载并提供它们,但现在它在任何浏览器中都不起作用我收到错误:
"NetworkError: 403 Forbidden - http://www.mychic.co.uk/includes/templates/SmartStart/fonts/architectsdaughter-webfont.woff" "NetworkError: 403 Forbidden - http://www.mychic.co.uk/includes/templates/SmartStart/fonts/architectsdaughter-webfont.ttf"
我尝试使用权限来授予对文件的读取和执行权限,甚至尝试过 777 并且仍然遇到相同的错误,字体肯定在它们应该在的位置,我的 css 看起来像这样:
@font-face {
font-family: 'architects_daughterregular';
src: url('../fonts/architectsdaughter-webfont.eot');
src: url('../fonts/architectsdaughter-webfont.eot?#iefix') format('embedded-opentype'),
url('../fonts/architectsdaughter-webfont.woff') format('woff'),
url('../fonts/architectsdaughter-webfont.ttf') format('truetype'),
url('../fonts/architectsdaughter-webfont.svg#architects_daughterregular') format('svg');
font-weight: normal;
font-style: normal;
}
body { font-family: 'architects_daughterregular'; }
有人建议我添加一个 .htaccess 文件,所以我将以下内容添加到站点的根目录和字体目录(是否正确):
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf
AddType application/x-font-woff .woff
任何想法我在这里做错了什么 - 任何帮助/想法都非常感谢?
【问题讨论】:
-
fonts目录上设置的权限呢? -
同理,我对字体目录和文件设置了相同的权限
-
使用什么网络服务器?抱歉,无法检查您直接提供的这些网址,因此是个愚蠢的问题。 )
-
更具体地说,服务器配置中是否提供了某种these directives?
-
服务器是 apache2 - 请参阅上面有关 .htaccess 的更改 - 这是正确的吗? - 仍然无法正常工作
标签: html css fonts permissions zen-cart