Leo He

How to add cutom icons into Font Awesome

Open IcoMoon

Click button on the top

launch-icomoon.png

Click import button to import your font awesome library(svg file)

icomoon-import.png

The you can see the icons on the page

font-awesome-icons.png

Click import to set to import cutom svg icons

screenshot20230110050154.png
Click the improted icon and edit it's properties

screenshot20230110050522.png

Finally click Generate Font to download custom font library

How to save canvas as SVG from the API in Ketcher

To generate image please use the following steps:

H2O

serialize struct to string:

const struct = await ketcher.getKet()

generate Blob:

const imgBlob = await ketcher.generateImage(struct) - png

or

const imgBlob = await ketcher.generateImage(struct, *options)

*options is an object with 'outputFormat' ('svg' or 'png') and 'backgroundColor' (optional) properties. for example:

let options = {outputFormat: 'svg'}

Also see issue