Scalable Vector Graphics (SVG) 2 Draft
w3.org
w3.org
Overall, I like the changes; seems like it won't be as much of a leap to figure out how to do things in SVG vs CSS, and we've got a bunch more styling options for various elements. Here's a link directly to the changlog:
Sadly it's also the main reason for why we're not planning to support any version of IE moving forward although many users request it.
Slightly unrelated, but I'm also happy to see getStrokeBBox in there. It's been a total pain to manually compute the stroked bbox of each stencil so the layout engine can properly arrange each element in respect to its painted area.
This approach did not cause any noticeable change in performance, at least not in my use case where there are at most around 100 nodes of text that needed word wrapping. I can't really compare it with other approaches since I saw no need to take multiple stabs at the problem when my first attempt proved to work well enough. I would guess that it might be faster than actually creating SVG text elements and then trying to get their widths since you're eliminating a lot of overhead in the pre-calculation phase. Also, as far as desktop browsers go, anything that has SVG also has canvas, so there were no worries there about browser compatibility issues.
EDIT: But yeah, I'm just mentioning this in case you find some use for it. Looking at your link I would say you're much better off just using foreignObject.
[1]: http://www.w3.org/TR/2012/WD-filter-effects-20121025/#feCust...
[2]: http://www.w3.org/TR/2013/WD-SVG2-20130409/masking.html#Simp...
I'm really glad to see progress on SVG and hope this will finally make Mozilla to support SVG Tiny Fonts. This bug on their Bugzilla is 11 (!) years open:
For example if you had a very tall SVG image, you would constrain the height of the block that it was in, and set the overflow-style to paged-y. The browser would then provide some form of control for you to page vertically through the content in that block.
This stuff is currently documented in the GCPM module, but I suspect it will move somewhere else eventually.
I would consider printing to be another story though. It is possible to have a page size that spans to several pages when printing, but still it represents just one page.
PDF is not the best analogy because it was designed to be a document format from the beginning.
Anyway, I will stop here because this thread is reaching the futile point.
Wow. And that's not the first time I've seen Bugzilla reports open for years. Does nobody work on these features or something?
Some guy offered that his company could implemented it. No one said yes.
And if it already does: then something must be wrong because I would have expected many awesome SVG games on Newgrounds if it worked well.
While we're on the subject, SVG should also support a third dimension. With 3D printing becoming a reality, I think this is a crucial feature to have.
I think it's an awesome and underutilized technology, don't get me wrong, but SVG has a place and it really isn't games. The furthest I've gone is a Go game in SVG, but that's a special case.
I would disagree... as a graphics file format it is very suitable for games, specially given its size. It is not intended to be a multimedia document format (I believe he is comparing SVG with SWF which is not valid since they have different design goals).
Edit: Or perhaps it's because the other technologies "carve out" a piece of the page just for themselves whereas SVG doesn't and so browser reflow/layout code has to be invoked more often when SVG elements are being used?
It's nice for very interactive demos and lightweight visualizations, not for rendering-heavy things like games.
For instance, you would not have DOM-related problems if you use svg files in a native mobile game.
The downside of using SVG in a game is that the render is slower in comparison with a rasterized image. However, all graphics formats have pros and consts, so it always depends on how are you going to use them.