Opera 中的自定义字体问题

发布于 2024-11-19 16:03:43 字数 583 浏览 2 评论 0原文

我正在使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

会发光的星星闪亮亮i 2024-11-26 16:03:43

Opera 团队在 Opera 浏览器中嵌入了新的字体渲染模块,以支持“.WOFF”格式。他们从 Opera 11.10 开始使用这个新模块。
尝试将您的字体“.ttf”和“.otf”格式转换为“.WOFF”,它应该与 MicrosoftMozillaOpera 兼容> 浏览器。我在此处添加了一个链接来支持我的答案。

http://dev.opera.com/ articles/view/introducing-woff-web-open-font-format/#introduction

@font-face {
  font-family: 'raleway';
  src: url('raleway_thin-webfont.woff') format('woff');
  font-style: normal;
}

em {
  font-family: raleway, serif;
  color: #F45355;

}

另外,以防其他人想要查看有关其字体的 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

@font-face {
  font-family: 'raleway';
  src: url('raleway_thin-webfont.woff') format('woff');
  font-style: normal;
}

em {
  font-family: raleway, serif;
  color: #F45355;

}

Also incase someone else wants to look through the Opera docs about their fonts.
http://www.opera.com/docs/specs/presto29/css/fonts/

再可℃爱ぅ一点好了 2024-11-26 16:03:43

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.

短叹 2024-11-26 16:03:43

我解决了这个问题。我使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文