css - 歌剧中的自定义字体问题

标签 css fonts 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;}

最佳答案

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/fonts/

关于css - 歌剧中的自定义字体问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6674494/

相关文章:

java - 某些 FontAwesome 字形不会在 Java Swing JToolBar 按钮中呈现

html - 现代浏览器还需要 svg 定义文件来实现 font-awesome 吗?

CSS3 动画不适用于 Opera 和 Firefox,但适用于 Chrome 和 Safari

html - 避免在 html/css 中的桌面 View 中水平滚动

android - 较低版本的 android 设备中的 kannada 字体支持

html/css 页眉和页脚没有填满整个空间

html - Opera 和我没有正确处理 css 伪类

css3 过渡在歌剧中无法正常工作

html - 使用 foreach 显示,但调整行和列之间的空间

css - 如何在 ioslides rmarkdown 的过渡幻灯片中更改字体大小和文本颜色