2013-02-05 3 views
0

이상한 방식으로 cufon 글꼴을 사용하는 웹 사이트가 있습니다 (Atleast I have'nt before this). 그들은 이상한 글꼴로 변경하려고합니다. 간단한 "재고 상품"을 표시하기 위해 작성된 코드는 다음과 같습니다.Cufon 글꼴을 변경할 수 없습니다.

<h2><cufon class="cufon cufon-canvas" alt="Stock " style="width: 68px; height: 26px; "><canvas width="93" height="29" style="width: 93px; height: 29px; top: -3px; left: -3px; "></canvas><cufontext>Stock </cufontext></cufon><cufon class="cufon cufon-canvas" alt="Products" style="width: 96px; height: 26px; "><canvas width="116" height="29" style="width: 116px; height: 29px; top: -3px; left: -3px; "></canvas><cufontext>Products</cufontext></cufon></h2> 

헤더에는 cufon.js 파일 만 포함됩니다.

나는이 같은 글꼴을 대체하려고이도 작동하지 않습니다

<script src="scripts/cufon-yui.js" type="text/javascript"></script>--> 
<script src="scripts/Adobe_Fan_Heiti_Standard_OpenType_600.font.js" type="text/javascript"></script> 
<script type="text/javascript"> 
     Cufon.replace('h2','h1','h3','h4'); 
    </script> 

. 코드가 너무 길어서 파일이 너무 커서 수동으로 코드를 편집 할 수 없습니다. 친절하게 몇 가지 해결책을 제안하십시오.

미리 감사드립니다.

답변

1

귀하의 cufon 구문이 올바르지 않은 것 같습니다. 대신

Cufon.replace('h2','h1','h3','h4'); 

의 시작 부분에 코드를 나타냅니다 무엇을 달성하기 위해, Cufon의 API에 따르면

Cufon.replace('h2'); 

하려고하면 사용해야 할 것 :

또는
Cufon.replace('h1')('h2')('h3')('h4'); 

, 귀하의 사이트에서 jQuery 또는 이와 유사한 JS 프레임 워크를 사용하는 경우 다음과 같을 수 있습니다.

Cufon.replace('h1, h2, h3, h4'); 

자세한 내용은 https://github.com/sorccu/cufon/wiki/API