4 ms·
Three years ago I was amazed by the versatility of SVG when I discovered it through D3 and it inspired our graphical designer to ask us designs never before see
by edejong 10y ago
Three years ago I was amazed by the versatility of SVG when I discovered it through D3 and it inspired our graphical designer to ask us designs never before seen in SaaS applications. Once you're willing to dive into the specifications, you'll find a treasure trove of possibilities.
There are some caveats beginning users should be aware of. First of all, better forget multi line text or sophisticated text layout within the SVG. I still think that's really missing in the current specification. As a commute project I once wrote the dynamic programming layout of Knuth (used in TeX) for SVG and JavaScript, but it was slow and didn't allow for multi line selections.
Another problem is rendering speed. SVG renderers can be fast, but you have to know what can be optimized by the gpu and what requires the CPU.
- th0ma5 10y agoI have had success with LaTex -> Inkscape -> SVG ... It was a kludge but got automatic fancy ligatures and such. YMMV!
- edejong 10y agoYes, but that wouldn't be dynamic (unless, of course, you run LaTeX and Inkscape in JavaScript, which would be cool but a bit wasteful).
- comex 10y ago> First of all, better forget multi line text or sophisticated text layout within the SVG. Can't you do it by embedding an HTML document into the SVG with foreignObject? (edit: corrected name)
- edejong 10y agoYou are absolutely right [1]! It is not supported by IE, unfortunately. [1] Made a small jsfiddle: https://jsfiddle.net/7y27wfuy/ https://jsfiddle.net/7y27wfuy/