Surfin’ Safari

SVG Text Support

Posted by Maciej Stachowiak on Tuesday, January 10th, 2006 at 3:07 am

I spent a few hours hooking up WebCore’s text rendering engine to SVG, and now we have basic SVG text support going. Here’s an example showing both fancy text features (multiple, high-quality, anti-aliased fonts) and fancy SVG features (the text is skewed and rotated):

SVG Text

Here’s the actual SVG file if you have a fresh WebKit build and want to try it yourself.

This only took a few hours of work, thanks to all the great work Rob and Nikolas did on ksvg2 and all the hard work that Eric did porting it to Quartz and integrating it with WebKit.

12 Responses to “SVG Text Support”

  1. AlthA Says:

    Good stuff :), nice work Maciej :).

  2. simifilm Says:

    Great, is this already in the nightlies?

  3. maciej Says:

    Yep, it’s in the latest nightly.

  4. Robin Says:

    So who’s job is it to admin MIME types on webkit.opendarwin.org? text/plain isn’t the most suitable for SVG content

  5. Philippe Says:

    It might be nice if you send that with the correct mime type over the wire; users of Gecko browsers, and Opera, might enjoy this svg file as well.
    And it would be a good thing for everybody if Safari was a bit stricter in accepting documents like this. You know, web standards and all that.

    Granted, it looks nice in the latest nightly webkit build.

  6. ddkilzer Says:

    Filed Bug 6470 for SVG MIME type issue.

    http://bugzilla.opendarwin.org/show_bug.cgi?id=6470

  7. Robin Says:

    Thanks ddkilzer. Btw, I completely forgot to congratulate the Webkit team for the progress in my earlier comment. Well done guys!

  8. Philippe Says:

    I did now test run that svg file form my local dev server. Interesting. Both Opera 9 prev and Camino nicely show the colours (marroon and green) but fail the font test (For Gecko, that is known issue, it simply not yet implemented). Webkit on the other side fails to show the colours.

    Thanks ddkilzer for the mimie-type bug.

  9. simifilm Says:

    Not strictly OT, but congratulations on the newest update to Safari in 10.4.4, feels a lot smoother here.

  10. gelosilente Says:

    well, i acutally have the svg plugin from adobe: must i remove it?

  11. Jeff Schiller Says:

    Congratulations on your progress - can’t wait to hear about the results once it’s released (I don’t have a Mac)

  12. gelosilente Says:

    i respondo to myself: yes, the old svg plugin from adobe must be removed.