JohnF wrote:
a question in the subject line
SVG is supported by every browser I have to hand, safari, chrome, firefox,
seamonkey, opera, *except* any version of IE. For IE you have to use VML
which is quite similar but with a totally different syntax.
So, basically, SVG is not viable in the wild unless you back it up with VML.
> Not sure which ng to post this question to: I'm trying
> to google info about svg (scalable vector graphics)
> image support in different browsers, and what html tag(s)
> are used to embed svg images.
> Seems to me like a straightforward
> question, but hard (for me) to google any straightforward info.
> Are there any reasonably easy-to-understand and reasonably
> authoritative pages that discuss this? (Or a more appropriate
> ng to post the question in?)
There is very little out there about how it's done. You have to search for
SVG and wade through the millions of hits. Some are very worthwhile. Some
are rubbish. But this is always the case
Some of the stuff at mozilla is OK. W3schools has a tutorial that is sort of
OK. There are a few examples.
http://www.svgbasics.com has lots of examples.
Beware if those things that use javascript to translate SVG to VML. They do
sort of work but don't do everything and sometimes run like a dog. They are
however useful for exploring the similarities between SVG and VML. excanvas
is one. raphael is another.
I have written my own at a higher level, up in PHP. Single calls to the
members of a PHP class produce both SVG and VML.
It's at proof of concept stage but does produce reasonable output. Here is
an example of the HTML it produces, complete with all the rough edges that
you expect from a proof of concept page. The namespace stuff and the
stylesheet if to turn on VML in IE.
http://barefile.com.au/test/graph.html
You can see the SVG and VML produced. Conditional comments are used to feed
VML to IE and SVG to the others.
The major concept that needed proving is how to embed SVG directly into an
HTML page. SVG is an XML application and the page it lives in is <svg> as
you have found, not <html>. I stuff the whole lot into an object embedded
into the HTML page, like you are trying to do. This was stolen from some
post on some forum somewhere that I found after several hours of googling
and have long since lost.
Neither SVG nor VML do text very well and they do it very differently. In
fact for Firefox you need the 3.1 beta to do it at all.
I overlay HTML text over the top of the SVG or VML graphics. Simple and it
works. Of course everything is absolutely positioned but that's OK as this
page is destined for print.
> And there's an adobe svg plugin that everybody seems to say
> is garbage, and that adobe says it no longer supports.
Don't. You don't want your viewers to have to download a plugin.
> Can anyone point me to a page with reliable info? Thanks,
No, not really.
--
Richard.