367 posts
  • 7 Years of Membership
  • Beta Tester
  • Collector Level 2
  • Denmark
+1 more

Hey I am having an issue rendering “dynamic” text from a twitter feed on my theme. The feed it placed in my footer and I have no issues replacing static text but when using the a JQUERY plugin for showing feeds it fails to render any of the text pulled in.

I have tried adding many of the html tags to the cufon replace code but none worked for the dynamic text.

I am using a test code I got in a theme I purchased on Themeforest but this problem is so urgent and not really related to the theme but the general solution of rendering cufon on dynamic text so I hope you guys can help me.

Here is the test HTML :

<script src="js/cufon_ie9.js" type="text/javascript"></script>
    <script src="js/ArdleysHand_500.font.js" type="text/javascript"></script>
    <script src="js/Gotham_Narrow_Light_300.font.js" type="text/javascript"></script>
    <script type="text/javascript">
      Cufon.replace('h2', { fontFamily: 'ArdleysHand' });
      Cufon.replace('#footer h3', { fontFamily: 'ArdleysHand' });
      Cufon.replace('#tagline h4', { fontFamily: 'ArdleysHand' });
      Cufon.replace('div#tweet-text', { fontFamily: 'ArdleysHand' });
<!--twitter widget -->
         <div data-username="pixilcase" id="twitter">
             <h3>Tweet Widget</h3>
             <p>Loading latest tweet - follow us here <a href="http://www.twitter.com/pixilcase">@pixilcasw</a></p>
        <!-- end twitter widget-->
Output HTML :
<h3><cufon class="cufon cufon-canvas" alt="Tweet " style="width: 41px; height: 14px;"><canvas height="21" width="56" style="width: 56px; height: 21px; top: 0px; left: -4px;"></canvas><cufontext>Tweet </cufontext></cufon><cufon class="cufon cufon-canvas" alt="Widget" style="width: 42px; height: 14px;"><canvas height="21" width="55" style="width: 55px; height: 21px; top: 0px; left: -4px;"></canvas><cufontext>Widget</cufontext></cufon></h3>
<span><div class="tweet-created_at"><a href="http://www.twitter.com/pixilcase/status/100596048619249660">6 days ago</a></div></span>
<p><div class="tweet-text"><a href="http://twitter.com/Eleven2" class="tweet-mention">@Eleven2</a> Sounds good, waiting patiently :)</div></p>
The included files:
<script src="js/jquery-1.6.1.min.js" type="text/javascript"></script>
<script src="js/twitter.js" type="text/javascript"></script>
2258 posts Digital Artist
  • Front Page Master
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
+15 more

Make sure that cufón styles the text after your twitter feed has loaded.

$(document).ready(function() {

// your twitter feed code



And if that doesn’t work, try binding the twitter feed to a load function, so that only after it has fully loaded, the text is cufonized.

$(document).ready(function() {

function yourTwitterFeed() {

// the twitter feed run script


yourTwitterFeed.bind('load', function() {




614 posts
  • Envato Team
  • Envato Tuts+ Instructor
  • Weekly Top Seller
  • Bundle Boss
+11 more
Envato team

Crozer is on the money. Cufon renders itself as text only to elements it has been called on at the moment of calling. If you’re loading your tweets dynamically, they won’t get styled.

Run the replace method along with the loading process and it should work.

PixelBin_DISABLED Recent Posts Threads Started
1479 posts The right tools with none of the gimmicks
  • Affiliate Level 4
  • Beta Tester
  • Collector Level 2
  • Weekly Top Seller
+5 more

Or do a Cufon.refresh() after the tweets load (I think, haven’t used that thing in a while). Either way, there’s a refresh function that you can use, just have to find the right name of it if I’m wrong.

501 posts
  • Affiliate Level 7
  • Author Level 10
  • Collector Level 2
  • Top Monthly Author
+10 more

first of all, it’s a sunday of mid August and i could be on holiday more than this only in death.

now i can understand the urgency and all but that still doesn’t justify a flood of item comments, especially when we talk about item customization.

said so, edit twitter.js
// find this block
// add this line

not tested but should work.