Change in pixels per inch?
Hi TimeWaster and Nick,
Alvin Penner has suggested that I contact both of you about a change to Inkscape I am pushing for:
Currently Inkscape transforms non-pixel units (e.g 'in', 'cm') using the ratio 90 pixels per inch. This ratio is hinted at in SVG 1.1 but not explicitly defined (someday I'll blog about the history of this). CSS 2.1 does explicitly defined the ratio to be 96 pixels per inch, a standard that all web browsers as well a Batik have followed for many years. I recently proposed that in SVG one should be allowed to set this ratio but that idea was quickly rejected by the standards group.
Previous to Inkscape 0.91 all dimensions inside of Inkscape were stored only as pixels values (despite allowing the user to enter dimensions in other units). As long as one did not import SVGs from other sources the ratio between px and in was not all that important. With 0.91, one can optionally set font-size to be output in points. To ensure consistency with what is rendered in Inkscape and what is displayed by other SVG renderers we should move to the standard 96 pixels per inch per CSS2.1.
To make the change, two files must be modified:
share/extensions/inkex.py share/ui/units.xml
and probably the default export resolution should also be changed in preferences.
Alvin is afraid this will cause trouble in the world of desktop cutters and plotters. Do you see this as a problem?
Thanks,
Tav
BTW, the 0.91 release notes suggest that extensions relying on units other than pixels were already broken by the work on units.
hi,
i just played around with the px/in conversion factor in the units.xml file and one thing came apparent: when you change this factor, you are not changing the px/in "unit", in reality you change the size of a pixel (since the size of inch is defined by the outside world), which affects ALL units.
internally all sizes are calculated with the intermediate step of converting into pixels. an example, converting mm to in:
100mm * 3.543307px/mm / 90px/in = 3.937007in (correct)
if i now just change the px/in definition to 96, i get:
100mm * 3.543307px/mm / 96px/in = 3,690944in (INcorrect and verified by changing the unit from mm to in on a 100mm cube in inkscape)
this means i also have to redefine px/mm to 3.779527:
100mm * 3.779527px/mm / 90px/in = 3.937007in (correct)
so if we redefine all the units and thus changing the "size" of a pixel, all conversions work as expected, just px will have a slightly different "viewing size" i think.
one question: what is the "default export resolution in preferences"?
regards, TimeWaster
On 23.4.2014 15:09, Tavmjong Bah wrote:
Hi TimeWaster and Nick,
Alvin Penner has suggested that I contact both of you about a change to Inkscape I am pushing for:
Currently Inkscape transforms non-pixel units (e.g 'in', 'cm') using the ratio 90 pixels per inch. This ratio is hinted at in SVG 1.1 but not explicitly defined (someday I'll blog about the history of this). CSS 2.1 does explicitly defined the ratio to be 96 pixels per inch, a standard that all web browsers as well a Batik have followed for many years. I recently proposed that in SVG one should be allowed to set this ratio but that idea was quickly rejected by the standards group.
Previous to Inkscape 0.91 all dimensions inside of Inkscape were stored only as pixels values (despite allowing the user to enter dimensions in other units). As long as one did not import SVGs from other sources the ratio between px and in was not all that important. With 0.91, one can optionally set font-size to be output in points. To ensure consistency with what is rendered in Inkscape and what is displayed by other SVG renderers we should move to the standard 96 pixels per inch per CSS2.1.
To make the change, two files must be modified:
share/extensions/inkex.py share/ui/units.xml
and probably the default export resolution should also be changed in preferences.
Alvin is afraid this will cause trouble in the world of desktop cutters and plotters. Do you see this as a problem?
Thanks,
Tav
BTW, the 0.91 release notes suggest that extensions relying on units other than pixels were already broken by the work on units.
On Mon, 2014-04-28 at 16:16 +0200, TimeWaster wrote:
hi,
i just played around with the px/in conversion factor in the units.xml file and one thing came apparent: when you change this factor, you are not changing the px/in "unit", in reality you change the size of a pixel (since the size of inch is defined by the outside world), which affects ALL units.
internally all sizes are calculated with the intermediate step of converting into pixels. an example, converting mm to in:
100mm * 3.543307px/mm / 90px/in = 3.937007in (correct)
if i now just change the px/in definition to 96, i get:
100mm * 3.543307px/mm / 96px/in = 3,690944in (INcorrect and verified by changing the unit from mm to in on a 100mm cube in inkscape)
this means i also have to redefine px/mm to 3.779527:
100mm * 3.779527px/mm / 90px/in = 3.937007in (correct)
so if we redefine all the units and thus changing the "size" of a pixel, all conversions work as expected, just px will have a slightly different "viewing size" i think.
You are correct.
one question: what is the "default export resolution in preferences"?
The initial value is defined in terms of It's actually defined in terms of share/ui/units.xml
Tav
Hi,
I've gone ahead and changed the 'experimental' branch to 96 pixels to inch per SVG/CSS specification. From the feedback I've received, I don't believe this will cause any significant problems but the only way to tell for sure is to try it out.
Tav
On Wed, 2014-04-23 at 15:09 +0200, Tavmjong Bah wrote:
Hi TimeWaster and Nick,
Alvin Penner has suggested that I contact both of you about a change to Inkscape I am pushing for:
Currently Inkscape transforms non-pixel units (e.g 'in', 'cm') using the ratio 90 pixels per inch. This ratio is hinted at in SVG 1.1 but not explicitly defined (someday I'll blog about the history of this). CSS 2.1 does explicitly defined the ratio to be 96 pixels per inch, a standard that all web browsers as well a Batik have followed for many years. I recently proposed that in SVG one should be allowed to set this ratio but that idea was quickly rejected by the standards group.
Previous to Inkscape 0.91 all dimensions inside of Inkscape were stored only as pixels values (despite allowing the user to enter dimensions in other units). As long as one did not import SVGs from other sources the ratio between px and in was not all that important. With 0.91, one can optionally set font-size to be output in points. To ensure consistency with what is rendered in Inkscape and what is displayed by other SVG renderers we should move to the standard 96 pixels per inch per CSS2.1.
To make the change, two files must be modified:
share/extensions/inkex.py share/ui/units.xml
and probably the default export resolution should also be changed in preferences.
Alvin is afraid this will cause trouble in the world of desktop cutters and plotters. Do you see this as a problem?
Thanks,
Tav
BTW, the 0.91 release notes suggest that extensions relying on units other than pixels were already broken by the work on units.
Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
2014-05-26 13:49 GMT+02:00 Tavmjong Bah <tavmjong@...8...>:
Hi,
I've gone ahead and changed the 'experimental' branch to 96 pixels to inch per SVG/CSS specification. From the feedback I've received, I don't believe this will cause any significant problems but the only way to tell for sure is to try it out.
Is this change also going to be in the 0.91 release? I think we should avoid releasing a version which has an invalid pixels per inch value AND document unit support.
Regards, Krzysztof
On Tue, 2014-05-27 at 03:36 +0200, Krzysztof Kosiński wrote:
Is this change also going to be in the 0.91 release? I think we should avoid releasing a version which has an invalid pixels per inch value AND document unit support.
I got the impression it's in experimental.
http://bazaar.launchpad.net/~inkscape.dev/inkscape/experimental/revision/133...
Which means 1.0 or 0.92 (depending)
Martin,
2014-05-27 4:11 GMT+02:00 Martin Owens <doctormo@...400...>:
On Tue, 2014-05-27 at 03:36 +0200, Krzysztof Kosiński wrote:
Is this change also going to be in the 0.91 release? I think we should avoid releasing a version which has an invalid pixels per inch value AND document unit support.
I got the impression it's in experimental.
http://bazaar.launchpad.net/~inkscape.dev/inkscape/experimental/revision/133...
Which means 1.0 or 0.92 (depending)
I would strongly suggest to put this in 0.91 as well. Otherwise we are shooting ourselves in the foot with a gratuitous incompatibility.
Regards, Krzysztof
one question: was only the px/in conversion factor changed?
On 27.5.2014 04:32, Krzysztof Kosiński wrote:
2014-05-27 4:11 GMT+02:00 Martin Owens <doctormo@...400...>:
On Tue, 2014-05-27 at 03:36 +0200, Krzysztof Kosiński wrote:
Is this change also going to be in the 0.91 release? I think we should avoid releasing a version which has an invalid pixels per inch value AND document unit support.
I got the impression it's in experimental.
http://bazaar.launchpad.net/~inkscape.dev/inkscape/experimental/revision/133...
Which means 1.0 or 0.92 (depending)
I would strongly suggest to put this in 0.91 as well. Otherwise we are shooting ourselves in the foot with a gratuitous incompatibility.
Regards, Krzysztof
The best possible search technologies are now affordable for all companies. Download your FREE open source Enterprise Search Engine today! Our experts will assist you in its installation for $59/mo, no commitment. Test it for FREE on our Cloud platform anytime! http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.cl... _______________________________________________ Inkscape-devel mailing list Inkscape-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/inkscape-devel
On Tue, 2014-05-27 at 04:32 +0200, Krzysztof Kosiński wrote:
2014-05-27 4:11 GMT+02:00 Martin Owens <doctormo@...400...>:
On Tue, 2014-05-27 at 03:36 +0200, Krzysztof Kosiński wrote:
Is this change also going to be in the 0.91 release? I think we should avoid releasing a version which has an invalid pixels per inch value AND document unit support.
I got the impression it's in experimental.
http://bazaar.launchpad.net/~inkscape.dev/inkscape/experimental/revision/133...
Which means 1.0 or 0.92 (depending)
I would strongly suggest to put this in 0.91 as well. Otherwise we are shooting ourselves in the foot with a gratuitous incompatibility.
Regards, Krzysztof
My intent is to put it in 0.91 if no gotcha's are discovered (and the release wardens agree). Documentation would also need to be updated.
Tav
participants (4)
-
Krzysztof Kosiński
-
Martin Owens
-
Tavmjong Bah
-
TimeWaster