ARM-console icon indicating copy to clipboard operation
ARM-console copied to clipboard

SVG as <img>

Open piersg opened this issue 14 years ago • 4 comments

... if we're (at least for now) madating a WebKit browser, we can just make the SVG an img tag. Webkit inlines and autosizes them just like any other image.

Long term, we'll need to include the dimensions in an tag. And link to one of those libraries that enable svg in IE [raucous laughter]

piersg avatar Dec 02 '10 00:12 piersg

Right now, the SVG is included like this:

and this SVG file starts with: <svg width="366pt" height="528pt" ...

Yes, it's a good idea; however, I still use Firefox for browsing autoexec.bin HTMLs. And it's possible that Firefox under Windows is fast enough (on my old P4, FF was much faster under windows for the same web pages). Is it possible to include both, so that each browser chooses what's best for itself?

alexdu avatar Dec 02 '10 07:12 alexdu

OMG - did Adobe help write Firefox? ;-)

I think should work on both - I'm building the considerable number of dependencies before I can run/modify the script so I haven't tried it, but that's the official way (i.e. there is no official way where the browser works out the size for you).

It's also quite possible to just drop in a JS hack to detect browser and make it img or object accordingly, but that's not very long term ...

piersg avatar Dec 02 '10 12:12 piersg

Building? I've installed almost all of them with easy_install... As long as you already have the ML build environment, the python libraries should not be difficult to install.

Which library did you have to build?

alexdu avatar Dec 02 '10 12:12 alexdu

Just noticed that SVG snipped was not visible => edited that comment.

alexdu avatar Dec 02 '10 12:12 alexdu