Opera 中的自定义字体问题
我正在使用 css 字体导入属性来在我的网站中使用自定义字体。字体是“LeagueGothic.otf”和“DroidSans.ttf”。除了 Opera(v-11.50) 之外,所有浏览器都表现完美。字体不流畅。他们已经破龄了,看起来很丑。 cufon 工作完美,但我不想使用它。有什么解决办法吗?多谢。你可以看看我的CSS代码风格 -
@font-face {
font-family: DroidSans;
src: url(DroidSans.ttf);
}
@font-face {
font-family: League Gothic;
src: url(LeagueGothic.otf);
}
body { color: #333333; font-family:'DroidSans',Arial; font-size:14px; line-height:20px;}
h1, h2, h3, h4, h5, h6, a{font-family: "League Gothic","Arial Narrow","Arial",sans-serif; font-weight: lighter; text-transform: uppercase;}
I am using css font import property for a custom font to use in my website. fonts are "LeagueGothic.otf" and "DroidSans.ttf". all browsers are behaving perfect except opera(v-11.50). the fonts are not smooth. they have broken ages and that looks ugly. cufon works perfect but I do not want to use it. is there any solution for this? thanks a lot. you can have look at my css code style -
@font-face {
font-family: DroidSans;
src: url(DroidSans.ttf);
}
@font-face {
font-family: League Gothic;
src: url(LeagueGothic.otf);
}
body { color: #333333; font-family:'DroidSans',Arial; font-size:14px; line-height:20px;}
h1, h2, h3, h4, h5, h6, a{font-family: "League Gothic","Arial Narrow","Arial",sans-serif; font-weight: lighter; text-transform: uppercase;}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Opera 团队在 Opera 浏览器中嵌入了新的字体渲染模块,以支持“.WOFF”格式。他们从 Opera 11.10 开始使用这个新模块。
尝试将您的字体“.ttf”和“.otf”格式转换为“.WOFF”,它应该与 Microsoft、Mozilla 和 Opera 兼容> 浏览器。我在此处添加了一个链接来支持我的答案。
http://dev.opera.com/ articles/view/introducing-woff-web-open-font-format/#introduction
另外,以防其他人想要查看有关其字体的 Opera 文档。
http://www.opera.com/docs/specs/presto29/css/字体/
The Opera team has embedded a new font rendering module to support ".WOFF" formats into the Opera browser. They started using this new module since Opera 11.10.
Try converting your font ".ttf" and ".otf" formats into ".WOFF" and it should be compatible with Microsoft, Mozilla and Opera browsers. I included a link here to support my answer.
http://dev.opera.com/articles/view/introducing-woff-web-open-font-format/#introduction
Also incase someone else wants to look through the Opera docs about their fonts.
http://www.opera.com/docs/specs/presto29/css/fonts/
Opera 只是浏览器,不支持带有 css 的自定义字体。我不知道为什么,但这很愚蠢。我不关心 Opera 客户/观众,就像关心使用文本浏览器的人一样。他们不喜欢新事物,好吧。
如果您不需要 cufon,另一种方法是 typekit https://typekit.com/ 对于个人页面,这是免费的,但这与 cufon 类似。
Opera is only browser, that not supports custom fonts with css. I don't know why but this is stupid. I don't care Opera customers/viewers same as peoples using text browsers. They don't like new things, ok.
Other way if you don't want cufon, is typekit https://typekit.com/ For personal pages this is free, but this is similar way as cufon.
我解决了这个问题。我使用 fontsquirrel.com 或类似的工具来生成 webfont,这在所有浏览器中都可以正常工作。
I solved this problem.I use fontsquirrel.com or like this tool to generate webfont and this works fine in all browsers.