-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Smart Margins #766
Comments
Any thoughts @benkiel, @LettError , @typemytype? |
I really like the idea of being able to approach margin values at a specific height. But that means there needs to be a way to record those heights somewhere in the glyph. Are guides the best medium? These can be angled - is that useful, or complicated? Also how would this relate to angledMargins? In an italic, with italic margins set? Would a y value, stored in glyph.lib suffice? (I don't like glyph.lib solutions, there is an impermanence to them) |
It could also be a named anchor, and you'd ignore the x value. |
Anchor or guidelines would work. My first thought was anchor but I switched to guidelines because they are already visualized in editors with a line. Extensions could add visualization to anchors (something like a line from the anchor to the intersection in the outline). If we use guides, I'd document that angles should be ignored. I tried to think about angled margins but my brain melted. I'm sure we can figure it out though. |
FWIW, I was thinking how having same functionality for spacing Arabic glyphs a while ago. When I set the margin for many glyphs, a lot of time I want the reference for the margin to be taken from the same height for most glyphs and not the margin that is based on the glyph bounds. |
The left, right, top, bottom margins rely on glyph bounds, which is fine for most work. There are times when it would be nice to be able to specify the y (in the case of left, right) where we want the measurement to be taken instead of the bounding box. I started writing this for a tool, but then realized that it might be useful in fontParts. Here's the idea (for left, right for now, but top, bottom are similar):
margins
,margin-left
, margin-right`leftMargin
orrightMargin
value is used.These would be accessible through properties, just like
leftMargin
andrightMargin
. The names that popped into my head weresmartLeftMargin
andsmartRightMargin
but I don't really like the vagueness ofsmart
. It implies magic but there is no magic in this. Maybe something likelocal*Margin
? I don't know...Here is a quick implementation:
Would this be a good addition to fontParts or is this something better left to an extension or something like that?
The text was updated successfully, but these errors were encountered: