O'Reilly logo

Firefox Hacks by Nigel McFarlane

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hack #62. Make SVG Content

Create dynamically changing diagrams based on vector graphics instead of static images.

Scalable Vector Graphics (SVG) is a W3C XML standard for defining two-dimensional images that are composed of vector graphics. SVG is useful for maps, illustrations, diagrams, and numerous other uses. SVG support is being added to Firefox and Mozilla, but at the time of writing, that support is still being finished. Many SVG features are complete, but there are still rough edges and gaps. This hack explains how to do something, in preparation for the day when you'll be able to do anything. To work with SVG, you need the right build of Firefox [Hack #92] and the right fonts in place [Hack #30] . If you're using an older operating system, this URL describes other files that you might also need:

http://www.mozilla.org/projects/svg/build.html

Understand Versions and Features

Mozilla SVG 1.1 support is being built in a project separate from the Firefox project. This means that Firefox does not always include the latest SVG changes. Here are the levels of SVG support provided by different versions of Firefox and Mozilla (as of the time of writing):

  • The standard installations of Mozilla and Firefox don't yet include SVG support.

  • Custom versions of Firefox 1.0 have SVG support at least as good as Mozilla 1.6.

  • Custom versions of Firefox 1.1 will have SVG support at least equal to that of Mozilla 1.8 (an estimate).

  • Mozilla 1.9 and Firefox 1.5 will have extensive cross-platform SVG ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required