
On 06-11-12 10:57, ian_bruce@...2136... wrote:
.. I don't understand why there should be specific code to handle metric units.
It is a different kind of "metric" :) (Think measure instead SI units.)
Surely the simplest thing to do is have the ratios between various real-world units defined in the "units.txt" file, and then have the "Default units" option from the "Document Properties/Page" dialog specify which one of those will be considered equivalent to "px" for purposes of that document.
Nobody said it is particularly difficult, but it does take time. Of course, if you're volunteering, I couldn't be happier :) (As would a whole lot of other people.)
Systems of related units, with integer ratios between them, such as inch/foot/yard/mile, and um/mm/cm/m/km, could be treated as a special case. Then specifying the ratio between any pair of them, such as 1.0 inch = 0.0254 metre , also determines all the other ratios. Having all such units specified in a config file eliminates the need for code changes when somebody wants to introduce new ones.
Actually, something like that might indeed make sense. Perhaps it would then make most sense to simply split the definitions of the units themselves and the relationships between them. Conversion between two units would then only be possible if there is a path of conversion rules between them.