为什么Opera(11.00)不显示自定义(@ font-face)字体? [英] Why won't Opera (11.00) display custom (@font-face) fonts?

查看:131
本文介绍了为什么Opera(11.00)不显示自定义(@ font-face)字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  @ font-face {
font-family:'PFDinMonoBold';
src:url('pfdinmono-bold-webfont.eot');
src:local('☺'),
url('pfdinmono-bold-webfont.woff')format('woff'),
url('pfdinmono-bold-webfont.ttf ')format('truetype'),
url('pfdinmono-bold-webfont.otf')format('opentype'),
url('pfdinmono-bold-webfont.svg#webfontS2rh8Zow') format('svg');
font-weight:normal;
font-style:normal;
}

使用鼠标鼠标发生器。 / p>

顺便说一下,自定义字体不会显示在松鼠网上



问题是什么? / p>

PS字体在ff,chrome中正常工作。

解决方案

必须对字体系列名称使用双引号。

  @ font-face {
font-family:PFDinMonoBold;
src:url('pfdinmono-bold-webfont.eot');
src:local('☺'),
url('pfdinmono-bold-webfont.woff')format('woff'),
url('pfdinmono-bold-webfont.ttf ')format('truetype'),
url('pfdinmono-bold-webfont.otf')format('opentype'),
url('pfdinmono-bold-webfont.svg#webfontS2rh8Zow') format('svg');
font-weight:normal;
font-style:normal;
}


@font-face {
    font-family: 'PFDinMonoBold';
    src: url('pfdinmono-bold-webfont.eot');
    src: local('☺'),
        url('pfdinmono-bold-webfont.woff') format('woff'),
        url('pfdinmono-bold-webfont.ttf') format('truetype'),
        url('pfdinmono-bold-webfont.otf') format('opentype'),
        url('pfdinmono-bold-webfont.svg#webfontS2rh8Zow') format('svg');
    font-weight: normal;
    font-style: normal;
}

made it with the font squirrel generator.

By the way, custom fonts are not shown on the squirrel web either

What could be the problem?

P.S font work fine in ff,chrome,ie

解决方案

You have to use double quotes for font family name.

@font-face {
font-family: "PFDinMonoBold";
src: url('pfdinmono-bold-webfont.eot');
src: local('☺'),
    url('pfdinmono-bold-webfont.woff') format('woff'),
    url('pfdinmono-bold-webfont.ttf') format('truetype'),
    url('pfdinmono-bold-webfont.otf') format('opentype'),
    url('pfdinmono-bold-webfont.svg#webfontS2rh8Zow') format('svg');
font-weight: normal;
font-style: normal;
}

这篇关于为什么Opera(11.00)不显示自定义(@ font-face)字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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