字体嵌入:这里有什么错误? [英] Font-embedding: what is wrong here?

查看:163
本文介绍了字体嵌入:这里有什么错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我还是新的html和css,所以我可能会忽略的东西。
一直在娱乐自己尝试创建一个小网站,并到达嵌入一个字体给它。
它是在firefox工作,但在互联网探索它不是。我不知道其他浏览器。
这是一个指向网站的链接。点击L转到第二页:
http://librarchive.com/newcat.html
由于这个还有一些定位错误,你可以看到。

I'm still pretty new to html and css, so I might be overlooking things. Been entertaining myself trying to create a little website and arrived at embedding a font to it. It is working in firefox, yet in internet explore it isn't. I do not know about other browsers. Here is a link to the site. Click the L to go to a second page: http://librarchive.com/newcat.html. Due to this there are also some positioning faults, as you can see.

所以字体不能正常工作。

So the font is not correctly working. What do I do?

这是我的css代码,我有一个.eot和.ttf文件的字体:

Here is my css code, i have a .eot and .ttf file of the font:

@font-face{ 
font-family: libralust; 
src: url('Futura_Bk.eot'); /* For IE */ 
src: local('libralust'), url('Futura_Bk.ttf') format('truetype'); /* For non-IE */ 
}

body {
font-family: libralust, Verdana, Arial, sans-serif;
text-align:center;
}

我一直在寻找,但是没有足够的经验来理解。
关于网站的其他评论也赞赏。感谢您的帮助!

I've been searching, but am not experienced enough to understand it all. Other commentary about site is appreciated too. Thanks for you help!

推荐答案

这是一个跨网站字体嵌入的示例,由 fontsquirel

this a an example of cross-site font embedding has suggested by fontsquirel

@font-face {
    font-family: 'OpenSansLight';
    src: url('/skins/default/media/fonts/OpenSans-Light-webfont.eot');
    src: url('/skins/default/media/fonts/OpenSans-Light-webfont.eot?#iefix') format('embedded-opentype'),
    url('/skins/default/media/fonts/OpenSans-Light-webfont.woff') format('woff'),
    url('/skins/default/media/fonts/OpenSans-Light-webfont.ttf') format('truetype'),
    url('/skins/default/media/fonts/OpenSans-Light-webfont.svg#OpenSansLight') format('svg');
    font-weight: normal;
    font-style: normal;

}

有什么问题吗?

我会指出另一个提示: local

I'll point another hint : local

详细解释阅读:-new-bulletproof-font-face-语法和/或 bulletproof-font-face-implementation-syntax

For a detailed explanation read this : the-new-bulletproof-font-face-syntax and/or bulletproof-font-face-implementation-syntax

这篇关于字体嵌入:这里有什么错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆