Feed Sign in with OpenID OpenID

Simon Willison’s Weblog

cufon. A promising alternative to sIFR, cufon uses VML on IE and canvas on other browsers to render custom fonts in the browser. You have to convert your font to JavaScript first, either using their free hosted tool or by installing the FontForge based server-side script yourself. The JavaScript encoded font file uses VML primitives to improve IE performance; the JavaScript library converts that to canvas calls for other, faster browsers.

Tagged , , , , , , , , ,

7 comments

  1. It seems strange to me that folks like to couple VML with Canvas. Wouldn't VML in IE and SVG in other browsers be simpler? I'm sure there's a good reason, but I don't know what it is.

    Martin Atkins - 7th April 2009 02:52 - #

  2. Of course, if I'd actually read the entire page before posting I'd know that they tried SVG and found it to be slow.

    How disappointing.

    Martin Atkins - 7th April 2009 02:53 - #

  3. That is hot stuff.
    I just need text selection (copy and paste) and I'm sold. Surprisingly, not brought up on the mailing list yet.

    Jeremy Dunck - 7th April 2009 04:44 - #

  4. Anyone know why font-face and the IE version of same aren't used for this kind of thing (where supported)? I mean if you're going to preprocess the font anyway.

    Dave - 7th April 2009 10:08 - #

  5. Dave,
    Over on the list, Simo said:
    "
    Internet Explorer only antialiases EOT fonts if ClearType is enabled.
    In XP (and older) machines it usually isn't, which means that there
    would be no antialising in IE6. This also applies to all other
    browsers that do not handle antialiasing internally.
    "

    Jeremy Dunck - 7th April 2009 21:46 - #

  6. I believe it doesn’t play nicely with screen readers yet though.

    Paul D. Waite - 8th April 2009 09:32 - #

  7. It seems that you can select text of elements that have "opacity:0", so perhaps this could be done by giving the elements containing the original text "opacity:0" and then positioning them on top of the canvas element.

    Kravvitz - 30th May 2009 01:30 - #

Comments are closed.
A django site