How to use cufon fonts on svg file?

231 views Asked by At

Is that possible to use cufon fonts on an svg file? I know using Raphael you can use the print method to use cufon fonts, like this:

Paper.print(x, y, string, font, [size], [origin], [letter_spacing])

Deos anybody have any other way of using the cufon fonts on an svg file? Any ideas would be appreciated.

Update: I was thinking about this:

  var s= Snap("#svg1");

  var text1 = s.text(10,150,"Snap.svg is great!").attr(

  {fill:"black", id : "text1", fontSize:"25px"});

  //Snap.registerFont();

   Cufon.registerFont();

    //Cufon.replace('h1'); // Works without a selector engine

    Cufon.replace('#text1'); 

    console.log(s.toString());

Any ideas why this wouldn't work the same way as an html would?

http://jsfiddle.net/fzhv0swk/

0

There are 0 answers