Converting Fabric.js text to path

fabricjs, javascript, svg

Solution

I think it should be possible with https://github.com/nodebox/opentype.js now.

Problem

I write some text on canvas with Fabric.js lib and with google fonts included. Then I export canvas to SVG through `toSvg()` function. When I import `*.svg` file in the vector editor, e.g. Inkscape, the font become a default - Arial. Checking svg-file structure I do not identify any errors - it has proper font declaration. So I have a question: how to convert `fabric.Text` to shape or path, to save it without issue?

Original source