saveSvgAsPng icon indicating copy to clipboard operation
saveSvgAsPng copied to clipboard

How to use fonts in options parameter.

Open mtcanada opened this issue 4 years ago • 3 comments

By default, the font for the text is 'serif', but i would like to use 'san-serif' font. How should I do it? i don't know what to use for text. url and format parameter for the parameter since there is no sample.

mtcanada avatar Feb 24 '20 02:02 mtcanada

Use regular CSS to change the font. The fonts option is for webfonts, which you shouldn't need just to get a sans serif font in your output image.

exupero avatar Feb 24 '20 14:02 exupero

its better to add the syntax of all the options available for the saveimageasPNG.js so that users can easily understand and use it. I want to add 'Titillium Web' fonts to my downloading file, how can i do that? Please help me.

mkpasala avatar Apr 01 '20 11:04 mkpasala

Hi @mkpasala. Yes, fonts section could have more examples. I've added example for Google fonts that worked for me: https://github.com/exupero/saveSvgAsPng/issues/240#issuecomment-613270106

andrius-386 avatar Apr 14 '20 07:04 andrius-386