Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update px unit size for files created by Inkscape >0.92 #347

Closed
pelrun opened this issue Mar 9, 2016 · 1 comment
Closed

Update px unit size for files created by Inkscape >0.92 #347

pelrun opened this issue Mar 9, 2016 · 1 comment

Comments

@pelrun
Copy link
Contributor

pelrun commented Mar 9, 2016

When investigating #346 it became clear that we're going to have an issue with documents produced by Inkscape 0.92 and later, because the px unit is moving from 90dpi to 96dpi. The original value was due to a typo in the CSS2 standard that was fixed in an errata, but Inkscape used the incorrect value. It's finally been fixed in the development version.

Since Illustrator and other SVG producers use different sizes for the px unit, Visicut tries to determine the creator of an imported file and set the dpi appropriately. We'll soon need to distinguish between SVGs from Inkscape <=0.91 and Inkscape >=0.92 for this to work consistently. Also, the fallback value is 90dpi which seems like it should also be changed to 96 since non-Inkscape producers are more likely to use the latter value than the former.

@pelrun pelrun changed the title Update SVG default dpi for px unit Update px unit size for files created by Inkscape >0.92 Mar 9, 2016
@jnweiger
Copy link
Contributor

Start inkscape0.92 with out loading an svg file, draw some objects, and send to an extension.
The svg sent has no inkscape:version element.
Save as box.svg, then send to an extension, the svg contains 'inkscape:version="0.92.1 unknown" sodipodi:docname="box.svg">'

As an inkscape extension, we cannot know if we should assume 96 or 90 dpi, unless we find a 'sodipodi:docname' element.
If we find sodipodi:docname, but we don't find inkscape:version, we can assume 90.
If we find both, we can assume 96.

Looks like a bad inkscape bug to me!

jnweiger added a commit to fablabnbg/VisiCut that referenced this issue Apr 22, 2017
Parse the inkscape version number from the SVG headers.
Then decide for a dpi settings.

Next time give me a DPI number right in the document, please!
jnweiger added a commit to fablabnbg/VisiCut that referenced this issue Apr 22, 2017
Parse the inkscape version number from the SVG headers.
Then decide for a dpi settings.

Next time give me a DPI number right in the document, please!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants