4 ms·
I am sad it saves raster PNG files rather than something scalable like SVG or PDF. SVG seems like an easy win.
by csrunlmfvth1 11y ago
I am sad it saves raster PNG files rather than something scalable like SVG or PDF. SVG seems like an easy win.
- bzbarsky 11y agoCreating a raster image can just use the normal painting codepath, since that's what a browser has to do anyway to get pixels up on the screen. Encoding stuff in SVG, on the other hand, requires adding a lot more plumbing (and some parts of it, like element() backgrounds it's not immediately clear how you'd do without rasterizing things).
- csrunlmfvth1 11y agoPerhaps I am wrong in assuming, but I thought it was effectively converting to something like a <canvas> behind the scenes anyway, simply for scalability/zoom purposes, in which case it just needs to have a node-focused clipping area, even if the all other elements remain rendered outside of the clipping area (though most could be discarded, as they are off-screen). Even if untrue, simply substitute Postscript for SVG in my comment... Firefox can clearly print an <html>-rooted DOM node. Even if they just had a "print DOM node" item, the result could be passed to the normal printing path to get something close to a .PS. Users often have Print-to-PDF software already. Printing a specific node is a major use-case, and for that text needs to still be as scalable fonts.
- bzbarsky 11y agoLeaving the fonts scalable while rasterizing everything else would be fairy doable, yes.