@ Font-Face在Opera中不起作用

时间:2012-04-18 19:04:26

标签: fonts opera font-face

我希望你能花点时间帮我解决这个问题。我正在尝试将this font整合到wordpress主题中。它的效果很好FF,Chrome和IE。但我对Opera有问题。最奇怪的是它加载但看起来像文件格式被破坏了。我知道它加载,因为页面加载字体从serif转换为sans-serif。

我使用fontsquirrel和其他一些转换器来创建一个工具包,但似乎没有一个工作正常。

@font-face {
    font-family: 'Blanch-Caps';
    src: url('<?php bloginfo('stylesheet_directory'); ?>/font/blanchcaps/blanch_caps.eot');
    src: url('<?php bloginfo('stylesheet_directory'); ?>/font/blanchcaps/blanch_caps.eot?#iefix') format('embedded-opentype'),
         url('<?php bloginfo('stylesheet_directory'); ?>/font/blanchcaps/blanch_caps.woff') format('woff'),
         url('<?php bloginfo('stylesheet_directory'); ?>/font/blanchcaps/blanch_caps.ttf') format('truetype'),
         url('<?php bloginfo('stylesheet_directory'); ?>/font/blanchcaps/blanch_caps.svg#blanch_caps') format('svg');
    font-weight: normal;
    font-style: normal;
}

.title h3 {
    font-family: 'Blanch-Caps';
    text-transform: lowercase;
}

除了Opera之外,其他所有浏览器都能正常工作。 我正在使用小写变换,因为Blanch不支持大写。

我希望得到任何帮助。

感谢。

1 个答案:

答案 0 :(得分:1)

这是一个已知的Opera错误......你只需要添加双引号:

@font-face {
    font-family: "Blanch-Caps";
    ...

此处有关此问题的更多信息:Why won't Opera (11.00) display custom (@font-face) fonts?

相关问题