On Mon, 05 Nov 2012 17:56:07 +0800 Jelle <pjmulder@...353...> wrote:
After some digging I found that Inkscape uses a 90dpi setting internally for everything. It finally explains the insane precision to me. Now that's fine with me, but it would be really handy if you could set your own preferences. As a user of metrics it really is mindnumbing to have to work with 3.543307 px per mm. I'd much rather would set that to 10 or 100 for instance so I can more easily work from px units into mm and vice versa. I guess that for those that use their feet to do measurements 90dpi makes more sense though they must have some trouble when it comes to fractions of Inches (what pinky's?). If I want to design something in metrics and I get all those fractioned numbers in my files, it makes it a tad difficult to edit it by hand or script. Especially the latter is rather important for me.
see my recent post on a related subject:
http://sourceforge.net/mailarchive/message.php?msg_id=30053042
So the question here is,.. is it humanly possible to create a setting of your units and their conversion to px so the whole SVG document starts using those unit settings? If this is set in some script, where can I find the script and wouldn't it be great if that could be turned into a user settings config script that is editable from Inkscape.
quoting myself:
The inch and foot units are defined in the Inkscape config file "/usr/share/inkscape/ui/units.txt", or possibly "/usr/share/inkscape/ui/units.xml". I'm not sure which of these files is supposed to be normative; why are there two of them?
If you were to edit your "units.txt" file to include the following definitions, that might accomplish some of what you want:
# name name_plural abbr type factor PRI description # --------------------------------------------------------------------------- pixel pixels px LINEAR 1.00 Y CSS Pixels (1.0 px/mm) millimeter millimeters mm LINEAR 1.00 N Millimeters (1.0 mm/px) centimeter centimeters cm LINEAR 10.0 N Centimeters (10 mm/cm) meter meters m LINEAR 1000.0 N Meters (100 cm/m) inch inches in LINEAR 25.4 N Inches (25.4 px/in) foot feet ft LINEAR 304.8 N Feet (12 in/ft)
On the other hand:
It seems rather silly that for some purposes, the unit definitions would be read at runtime from a config file, while for other purposes, they would be compiled into the program binary, but that appears to be how it currently works.
I'd be happy to make an interface for it as an extension as I think even I could do that with my limited skills in programming. I bet it all comes down to getting Inkscape to recognise these new settings at runtime, but restarting the application after changing the settings might be an option (Alert: restart Inkscape to use your new settings).
I would point out that the SVG specification does not prescribe any particular ratio between "px" drawing units and actual physical lengths. (It certainly DOES NOT specify that 90 px = 1 inch, as Inkscape currently assumes [units.txt]; this ratio is only mentioned as "for example".)
http://www.w3.org/TR/SVG/coords.html#Units
I suggest that for Inkscape, "px" be considered to be equivalent to the specified "Default unit" from the Document Properties window. If the default unit is metres, or whatever, then that's what "px" means, for that document, but no other. I don't see how this is inconsistent with the SVG specification.
I love Inkscape and its functionality for web design, but I think making it more flexible with unit settings might make it really useful for those that want to organise their whole work flow including print with it.
Note the following related feature request, rated as "Priority: High":
https://blueprints.launchpad.net/inkscape/+spec/real-units
Bob wants to draw a house plan in feet and inches, but still print it on a letter-sized paper. (one idea: different layers can have different scales: e.g. border layer is actual size, house layer is 1 in. = 8 ft.)
-- Ian Bruce