Michael Borcherds
Michael Borcherds
Yes, that's possible using https://opentype.js.org/
Yes, it "just works"
1) this fork seems to be dead, try https://github.com/murkle/canvas2svg/ which has some fixes 2) you can use drawImage() to plot a bitmap 3) What you suggest won't make a vector...
See https://github.com/gliffy/canvas2svg/issues/68 for fix
Note, this seems important to get this working ` pattern.setAttribute("patternUnits", "userSpaceOnUse");`
Another workaround - this allows an SVG 'd' tag to be sent directly. Not very elegant but produces SVGs with nice filling! ``` ctx.prototype.createPatternSVG = function (image, repetition) { var...
Sorry, I seem to be wrong about PNGs not repeating. Proof: ``` ```
so the nice simple fix is just to add ` pattern.setAttribute("patternUnits", "userSpaceOnUse"); `after ` pattern.setAttribute("height", image.height); `in createPatternSVG() 😄
Yes, just use the standard canvas clipping operations
Try it - you can probably set the bounding box and/or the origin in the SVG