Open eufelipemateus opened 8 months ago
At the moment it only outputs to a PNG file, but in theory it wouldn't be hard to modify it to support SVG. https://github.com/isaackd/wcloud/blob/21aee448f98a1c4de5e4a11ccb6154daeb35c57d/src/lib.rs#L133-L168 This function could be changed to place the words in an SVG file since all the necessary data is there: word, font size, x, y.
Cool! i am starting change here will try make this feature. Still not working yet
https://github.com/eufelipemateus/wcloud/commit/baf0f7aaba25ee64d0bf736d24bcd762ff320c57
Looks good! Excited to try it out.
I checked out your branch and was able to modify it to get an SVG word cloud. Everything is slightly off because of the rendering differences between theab_glyph
library used for calculating word positions and SVG though. Let me know if you're interested in trying to take this further and I can make a PR on your repo with the code.
This feature would be dope! have not found any other wordcloud implementation supporting svg
I checked out your branch and was able to modify it to get an SVG word cloud. Everything is slightly off because of the rendering differences between the
ab_glyph
library used for calculating word positions and SVG though. Let me know if you're interested in trying to take this further and I can make a PR on your repo with the code.
Hello @isaackd Yes, I am interested in help. If you can do the PR to fix it I'll be happy. I can generate the svg but I still can't create the cloud itself.
At the moment it only outputs to a PNG file, but in theory it wouldn't be hard to modify it to support SVG.
https://github.com/isaackd/wcloud/blob/21aee448f98a1c4de5e4a11ccb6154daeb35c57d/src/lib.rs#L133-L168
This function could be changed to place the words in an SVG file since all the necessary data is there: word, font size, x, y.
Yes, I couldn't generate the svg, now I can't create the cloud. I want to create another function to allow me to generate only svg and keep the png generation function as it is today.
This lib generate SVG cloud word?