Cufon没有显示

时间:2011-06-05 02:19:54

标签: javascript html cufon

我无法理解为什么我的Cufon不工作,所有.js文件加载正常:

    <!DOCTYPE html>
<html lang="en">
<head>

<title>Company Name</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="includes/css/style.css?v=2" media="all">
<!-- Grab Google CDN's jQuery. fall back to local if necessary -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
    <script>!window.jQuery && document.write(unescape('%3Cscript src="includes/js/jquery-1.6.min.js"%3E%3C/script%3E'))</script>
<script src="includes/js/cufon.js"></script>
<script src="includes/js/Springsteel_Lig_300.font.js"></script>
<script>
        window.addEvent('domready',function() {
                    Cufon.replace('header h1');
                });
</script>
<body>

<div id="container">

<header>
                <h1>Company</h1>
                <div id="logo"><a href="http://Company.co.nz/">Home</a></div>

1 个答案:

答案 0 :(得分:1)

尝试更改:

<script>
    window.addEvent('domready',function() {
        Cufon.replace('header h1');
    });
</script>

只是:

<script type="text/javascript">
    Cufon.replace('header h1');
</script>

在更改后(使用Vegur.font.js字体,在Opera 11和Google Chrome 11上测试),它适用于我。

编辑:

也适用于Springsteel_Lig_300.font.js字体。我刚刚加载了Springsteel Light font(springsteel-lig.otf)并使用that site以js格式生成。

enter image description here