title: Run Cufon in PHP
body: <p>Is it possible to run the Cufon text replacement script in PHP (or before its sent to the browser)? The reason I ask is that there is a bit of an issue with the displayed HTML being its normal browser rendered text before Cufon is able to draw its magic over it. The user sees a flash of unrendered text (FOUT) before it is replaced with Cufon's awesomeness.  I've noticed that the rendered HTML has some tags generated in place of the HTML (canvas and Cufon tags) text and I thought, what if this could be done in PHP and then sent to the browser so that the browser actually receives the drawn text from the start?. Would this mean porting over the code that draws the text to PHP? This came as a stroke of genius or more likely stupidity last night and was wondering if anyone had some thoughts on the matter. Thanks for reading. </p>
  
  <pre><code> Cufon.replace('div#nav-menu a h5',{
              fontFamily:'United Stencil',
              hover: true,
              hoverables : {h5 : true}
              });         
          Cufon.replace('.stencil',{fontFamily:'United Stencil'})
          Cufon.replace('.heavy',{
              fontFamily : 'United Heavy',
              hover : true,
              hoverables : {
                                  h1:true,
                                  h2:true,
                                  h3:true
                                  }
          }); 
  </code></pre>
  
  <p>Here is the Cufoned HTML:</p>
  
  <pre><code>&lt;a class=" heavy" href="/mp_svn/node/5"&gt;
  &lt;cufon class="cufon cufon-canvas" alt="Products" style="width: 65px; height: 16px;"&gt;
      &lt;canvas width="77" height="17" style="width: 77px; height: 17px; top: -2px; left: -2px;"&gt;&lt;/canvas&gt;
      &lt;cufontext&gt;Products&lt;/cufontext&gt;
  &lt;/cufon&gt;
  </code></pre>
  
  <p>
  I would like to send the above HTML to the browser from the beginning, pre-Cufon it is something like:</p>
  
  <pre><code>&lt;a href="/mp_svn/node/5"&gt;Products&lt;/a&gt;
  </code></pre>