Let base be `stretch()`-able to accommodate wide attachments
Looking at the new reference image, it may be that this is actually only desirable for a subset of symbols. For arrows it seems very sensible, but for = it looks weird.
cc: @Enivex due to https://github.com/typst/typst/issues/1304#issuecomment-1723261507
Looking at the new reference image, it may be that this is actually only desirable for a subset of symbols. For arrows it seems very sensible, but for
=it looks weird.cc: @Enivex due to #1304 (comment)
It makes more sense for some symbols than others, but I'd argue that this should be opt-in regardless. Perhaps through something like stretch().
Whether the behavior is desirable is both subjective and situational.
@laurmaedje Introduced stretch(); please see the reference images.
@laurmaedje Introduced
stretch(); please see the reference images.
The image good to my eyes, but maybe you should also add tests with absolute lengths as well? Like 1cm or 2em, not just %-based.
Edit: And length < 100%. Maybe I'd like to scale an arrow, but not all the way to the length of the attachment.
@mkorje Thanks for the review!
I'm not sure if there exists any glyph that have both horizontal and vertical variants, which would cause problems then.
I can't really think of a glyph where that would make sense. I feel like the hstretch/vstretch naming doesn't feel Typst-y, so I'd prefer to avoid it.
Me neither, though I guess there's nothing stopping a font from including such things for a glyph. It wouldn't hurt then to have an axis parameter (or something like that) which is auto, just in case (but this is probably overkill).
And yeah I agree that it isn't very Typst like. Adding the word horizontal or vertical felt too verbose and I couldn't think of a nice shortening of both words.
Is there anything blocking this?
Hi - I became a bit busy recently so I'm fine with someone taking this work and create a new PR (hence the drop in my recent PR counts). I could come back to this later if that's not already done. Also, is a 0.12 release imminent?
I'd be happy to continue on this PR's work. It'd be nice to get this into 0.12.
Closing in favor of https://github.com/typst/typst/pull/5030. Thanks all!