On 23-9-2013 15:53, Tavmjong Bah wrote:
Hi,
First, congrats to Matthew for some very nice work.
I've just given the latest code a quick test and I've got a few comments. I certainly haven't thought thing through carefully but I would be interested in what others think.
I start by opening a new (from Templates) Letter in landscape mode.
- The Template dialog tells me I am about to create a 612x792 pixel
drawing. But the size of the drawing in the SVG file is set to 11in x 8.5in. Pixels are no where to be seen.
- I create a default grid. The grid spacing is in "pixels" or 1/90 of
an inch. I would expect it to be in fractions of an inch (1/4 or 1/10).
Currently, the default grid has its own unit setting. I agree that doesn't make sense, having a default document unit. I'm not too sure how to solve the issue with unitless default values: with inches, you'd want fractions of inches as default grid spacing, but with pixels I'd doubt that. Anyone have an idea how to resolve this?
- I set the grid to 1/4 of an inch with major grid line every 4 lines.
Looks good. Now I create a rectangle 1 in x 1 in. Ooops, it is 0.99999988 x 0.99999988 according to the XML dialog.
- I use the XML dialog to set it to exactly 1 x 1. Hmm, why isn't it
1in x 1in?
- Ah ha, the viewBox is set to 0, 0, 11, 8.5. This means that the "user
unit" aka "px" is equivalent to 1 inch. Maybe this isn't so bad, but it means I can't mix different units inside the SVG file. If I use "1in" for a dimension, it will be interpreted as 90 user units or 90 inches. My 20 "pt" text is stored as 0.277777776px in the SVG file (and shows up as 19.99 in the font-size widget).
My thinking is that it might be better to set the viewBox to 0, 0, 792, 612 and then explicitly use dimensions with "in" if that is what the user wants.
You know more about SVG than me, but, "user unit" =/= "px" right? I think it is pretty nice that one can now work in mm, and actually read mm values in the SVG. (path data for example) Setting the viewbox to 0, 0, 11, 8.5 in this case allows one to define things in inch values, like a proper document unit, right? It is 1 x 1, because the document unit is inches. No need to specify inches. But indeed, if you would write "1in" it should give the same result in this case. I think that is a bug that it does not do so at the moment.
Mixed unit functionality was intentionally left out for now.
cheers, Johan