@ font-face vs. cufon

And*_*rej 10 html css fonts cufon font-face

我正在一个网站上工作,目前使用@ font-face tehnique(this + this)来加载字体.我注意到一些特殊字符没有正确加载 - >ŠĐŽČĆšđžčć.也就是说,这些字符存在于字体本身中.所以,我做了一个测试...我用@ font-face字体和cufon字体加载了一个测试页...结果如下 - >

在此输入图像描述

当然,这里是代码 - >

<html>
    <head>
        <script type="text/javascript" src="cufon-yui.js"></script>
        <script type="text/javascript" src="ReprobateCRO_400.font.js"></script>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
        <script type="text/javascript">Cufon.set('fontFamily', 'ReprobateCRO').replace('h1');</script>
        <style type="text/css">
            @font-face {
                font-family: 'ReprobateCROLASTRegular';
                src: url('reprob_cro_last_last-webfont.eot');
                src: local('ReprobateCROLASTRegular'),
                     url('reprob_cro_last_last-webfont.eot?#iefix') format('embedded-opentype'),
                     url('reprob_cro_last_last-webfont.woff') format('woff'),
                     url('reprob_cro_last_last-webfont.ttf') format('truetype'),
                     url('reprob_cro_last_last-webfont.svg#ReprobateCROLASTRegular') format('svg');
                font-weight: normal;
                font-style: normal;
            }
            h2{
                font-family:ReprobateCROLASTRegular;
            }
        </style>
    </head>
    <body>
        <h1>--> CUFON --> š?ž?? Š?Ž??</h1>
        <br/><br/>
        <h2>--> @FONT-FACE --> š?ž?? Š?Ž??</h2>
    </body>
</html>
Run Code Online (Sandbox Code Playgroud)

到目前为止,我已尝试从utf8,widnwos1250切换编码,似乎没有任何东西可以与@ font-face tehnique一起使用...

所以,我有两个问题......有谁知道这里发生了什么?并且,如果我切换到使用cufon insted @ font-face - 这将减慢页面加载的速度多少?(结合cufon使用JS加载字体)

感谢您的时间!

bre*_*nac 9

最近,当我在一个网络字体密集的网站上工作时,我自己和@ font-face有很多问题,结果发现在线网络字体生成工具本身就是有罪的.他们只是生成了糟糕的.woff/.ttf/.svg/.otf文件,这导致了很多问题,很难找到问题的根源.

根据我的经验,提供100%有效免费网络字体的唯一在线网络字体生成服务是Font Squirrel.它还允许很多有用的东西,如字体子集,这可能也是你的情况下的问题(即你没有指定在你生成的网络字体中包含其他字符 - 塞尔维亚语/克罗地亚语是拉丁语扩展B的一部分,如果我我没有误会).