Embedding font into SVG with @font-face
Migrated from: https://bugs.launchpad.net/inkscape/+bug/1810192
Reporter: anatoly techtonik @techtonik
In SVGs produced by Inkscape, elements will not render correctly if browser don't have correct fonts. This limits Inkscape usability for SVG graphics on the web.
The best way to solve this problem is to embed font into SVG itself using style with base64 encoding and WOFF:
data:application/font-woff;base64,d09GRg...AANUyECU=
And use font subsetting to select only used symbols to reduce size and make SVG less than PNG. See https://oreillymedia.github.io/Using_SVG/extras/ch07-dataURI-fonts.html
It would be best for Inkscape to maintain connection to original font through name, hash or other data. This is needed for editing SVGs with font subsets, to find and select full font making sure that all glyphs are available for editing.
The edit process can highlight the border of text element in red and hint when full font is not available and glyphs are missing. When edit is finished and new glyphs are inserted from full font, the style information and embedding is updated.
Does that sound viable for 1.0?
Background - https://pagure.io/pagure/pull-request/4157