This function allows you to add web fonts after creation. The result is the
same as using the web_fonts argument in svglite(). Only SVGs created with
svglite can get web fonts added.
Arguments
- filename
The svgfile(s) or
svgobject(s) (as created bysvgstring()) to edit- web_fonts
A list containing web fonts to use in the SVG. The fonts will still need to be available locally on the computer running the code, but viewers of the final SVG will not need the font if specified as a web font. Web fonts can either be specified using
font_face()or given as a single string in which case they are taken to be URL's for an@importdirective to e.g. Google Fonts. For the latter, you can usefonts_as_import()to automatically generate the string, optionally embedding the font data in it. If the passed in string is not in the form of a URL or@importstatement then it is considered a font family name andfonts_as_import()will be called to convert it to an import automatically, using the default arguments.