Open UnHumbleBen opened 4 years ago
Do you mean that they look different in a viewer? Or that the exported SVG is actually different? Can you post screenshots?
One way they are different is that in the export, all styles are inline, whereas in the browser, they are a combination of inline and applied from the CSS file. I didn't see any way to have a CSS file as part of an SVG file, so this code:
seeks out relevant CSS styles that were applied to an element and puts them inline before exporting. I didn't see a way to iterate over all the styles that actually were explicitly listed in the CSS file. In the element, there's just a huge dictionary containing every possible style key, and it doesn't give any indication which ones are unnecessary because they are just equal to their default.
So instead, there's an explicit list of style keys to put inline (if they are not inline already):
But it may be that some relevant key is not there and should be added.
Sorry I was getting confused because the svgs looked different when I imported into the paper, but the svg files would look the same if open at a sufficiently large size. In the paper, some of the text in the helix circles are bulging out. I wonder if there is a way to change make the size of the svg auto adjust so that the text stays the same size relative to the helix:
This could be a problem exporting, or it could just be a problem with your SVG viewer.
Is this the example 16-helix rectangle? When I export from the main view, and I open that SVG file in Chrome, I see this:
When I open the same file in Inkscape, I see this:
As you can see, both of them look different than yours. They also look different than each other (see font inside the helices), presumably due to different fonts available to Chrome versus Inkscape.
The SVG styles do not quite match the UI, specifically the helix circles and text.