[WIP] SVG export#163
Conversation
|
There may yet be some consistent errors in my offsets. I've not spent a lot of time thinking precisely about the coordinate transforms. |
|
Thanks for working on this. I tried to do this with html but couldn't make the alignment work. Congress and several are overlaping or example. The problem with the upper and lower corners is that the height of the text depends on the letters in the word, and I think PIL uses a different baseline. Or rather, you don't know where the baseline of PIL is (because you don't know if there's a capital letter). It could be that this works. I need to look into it in more detail. I was also considering just moving to cairo instead of using PIL. |
|
This is great, I had precisely the same idea (using PIL to do the calculations and create an SVG alongside). However, I used the This pull request is a good step in the direction of having word cloud vector graphics. I would not really recommend using cairo, though, as it is a rather heavy dependency to have. Except if you're planning to integrate it as an "optional" engine. |
|
It's fairly succinct even writing out the XML. I have no plans to complete this, and you are welcome to take it over, @Lumiukko |
|
totally forgot that this was a thing. Well if anyone wants to work out the right offsets lol. |
d5ef10d to
ab85b24
Compare
|
ok, I think we still need something like this even if not perfect, going to test it out when I have time. |
|
Does it mean saving as .svg or .html are both not possible, because of various reasons? Even saving out as .html would do the job, as we could use other tools converting this .html to .svg Does html not allow adding layers on top of each other, no matter vertical or horizontal text? |
|
@michaelsjackson do you meant with this PR or without? Current master doesn't support html or SVG or any form of vector graphic, it's purely pixel based. |
Here I just quickly commented, did not test this svg modification yet. I know only your pixel solution so far, which works great. Now I was reading the other replies and you tried in the past html, but somehow it did not work? |
|
closed by #519 |


This is a hacky attempt at SVG support.
Issues:
font-weight,font-styleCSS values (and assume font is public on target system)yoffsetNo tests written as yet.