Closed madig closed 4 years ago
/cc @typesupply @benkiel @miguelsousa
Looks good to me.
Hi, why is this necessary? Isn't it better for all the values to be explicit in the UFO, instead of removing information?
This merge normalizes this:
<guideline x="270" y="506" angle="0"/>
into this
<guideline y="506"/>
I would not say that the x
or angle
is superfluous. I think the normalizer should do the opposite... if x
or angle
are missing, it should add them.
Agree, please revert @madig
Angle 0 means that guideline is parallel to the X axis. What does x="270" even mean?
Anyway feel free to revert, I don't use the tool myself.
Angle 0 means that guideline is parallel to the X axis. What does x="270" even mean?
It means that if the user decides to rotate the guideline, there is a center for rotation available, at the place where the user originally placed the guideline. It makes sense to keep both coordinates (and therefore the angle) from a UI standpoint.
Makes sense now, thanks for the clarification
@justvanrossum Ok, I get that we can't remove the x value even if the guideline is horizontal, but can we add it if it's missing, as @colinmford suggests? Would x=0 be an OK default value?
Or do you mean that there's an intentional difference in the UI between an horizontal guideline with an x coordinate and one without?
I don't know, really. But if you add x or y, sure, 0 would be good. (I'm not an active user of the normalizer, either)
I’m considering a change to the ufo spec to make x, y, and angle all required. It’s verbose but explicit
On Apr 17, 2020, at 11:02 AM, Just van Rossum notifications@github.com wrote:
I don't know, really. But if you add x or y, sure, 0 would be good. (I'm not an active user of the normalizer, either)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
It would also simplify validation, although you'd have to add an upgrade path so it would be more code net...
@madig I think it may be worth it. This has popped up in other spots (fontParts?) before, and it's worth the extra verbosity to make things explicit.
If the guideline angle is zero, the guideline is horizontal and it should be enough to keep just the
y
parameter. If the angle is 90 or 270, it is vertical and it's enough to keep just thex
parameter.