Ligature or pair positioning adjustment for |> pipe #3

Closed
opened 2025-12-30 01:28:50 +01:00 by adam · 12 comments
Owner

Originally created by @wezm on GitHub (Nov 6, 2025).

Originally assigned to: @sayyadirfanali on GitHub.

The pipe operator, common in Elixir and Gleam |> is ideally rendered symmetrically with the angle bracket and pipe vertically centred akin to how you are handling -> already.

Via https://lobste.rs/c/khzhcd

Originally created by @wezm on GitHub (Nov 6, 2025). Originally assigned to: @sayyadirfanali on GitHub. The pipe operator, common in Elixir and Gleam `|>` is ideally rendered symmetrically with the angle bracket and pipe vertically centred akin to how you are handling `->` already. Via https://lobste.rs/c/khzhcd
adam added the enhancement label 2025-12-30 01:28:50 +01:00
adam closed this issue 2025-12-30 01:28:50 +01:00
Author
Owner

@sayyadirfanali commented on GitHub (Nov 6, 2025):

i think it'd be better to add it as a ligature instead. that way, one can enable it anytime and it won't disturb combinations of any other glyphs, eg, square vs angular brackets.

can you point to some reference font ligature which is symmetrical the way you use it?

@sayyadirfanali commented on GitHub (Nov 6, 2025): i think it'd be better to add it as a ligature instead. that way, one can enable it anytime and it won't disturb combinations of any other glyphs, eg, square vs angular brackets. can you point to some reference font ligature which is symmetrical the way you use it?
Author
Owner

@quartztz commented on GitHub (Nov 6, 2025):

Iosevka test

Iosevka

Myna test

Myna


I do believe this comparison the kind of "expected" behavior? on Iosevka, the pipe symbol is visibly shortened, and the bracket is made larger so that they align in a pleasant way. I think the myna philosophy is not to make a full ligature as iosevka does, but it would be possible to plan for a better alignment.

@quartztz commented on GitHub (Nov 6, 2025): <img width="100" height="68" alt="Iosevka test" src="https://github.com/user-attachments/assets/ceb23272-6521-4ab2-b222-625a556be341" /> _Iosevka_ <img width="100" height="68" alt="Myna test" src="https://github.com/user-attachments/assets/65a14db3-22b2-473b-af67-3458f432a029" /> _Myna_ --- I do believe this comparison the kind of "expected" behavior? on Iosevka, the pipe symbol is visibly shortened, and the bracket is made larger so that they align in a pleasant way. I think the myna philosophy is not to make a full ligature as iosevka does, but it would be possible to plan for a better alignment.
Author
Owner

@wezm commented on GitHub (Nov 7, 2025):

Here's a few more examples from other fonts:

Image

I like the PragmataPro approach the best, where there is still a bit of separation between the | and >.

@wezm commented on GitHub (Nov 7, 2025): Here's a few more examples from other fonts: <img width="942" height="632" alt="Image" src="https://github.com/user-attachments/assets/a492f42a-f94d-4383-a9f1-9497f4c089ab" /> I like the PragmataPro approach the best, where there is still a bit of separation between the `|` and `>`.
Author
Owner

@sayyadirfanali commented on GitHub (Nov 7, 2025):

@wezm @quartztz thanks for the reference screenshots.

so, there are one of two things we can do:

  1. we can go with "contextual alternates" which would change the size/shape of the vertical bar (make it somewhat smaller in length). that would preserve the shape more or less but just change the size of the glyphs and possibly the positioning.

  2. we can go with "full-blown ligatures" which would replace the combination with a separate glyph altogether. if we do this, i like the Fira Code approach. because i think ligature should go all in on the shape without "residuals" from the component glyphs. also, i believe the simple triangle fits the simple design style of Myna.

what do you think?

@sayyadirfanali commented on GitHub (Nov 7, 2025): @wezm @quartztz thanks for the reference screenshots. so, there are one of two things we can do: 1. we can go with "contextual alternates" which would change the size/shape of the vertical bar (make it somewhat smaller in length). that would preserve the shape more or less but just change the size of the glyphs and possibly the positioning. 2. we can go with "full-blown ligatures" which would replace the combination with a separate glyph altogether. if we do this, i like the Fira Code approach. because i think ligature should go all in on the shape without "residuals" from the component glyphs. also, i believe the simple triangle fits the simple design style of Myna. what do you think?
Author
Owner

@krig commented on GitHub (Nov 7, 2025):

@sayyadirfanali I'm not @wezm or @quartztz but I think the contextual alternates option is the one that appeals to me the most! I am also not a huge fan of going full-blown triangular arrow,
I would prefer to maintain separation but just make the glyphs harmonize a bit better.

@krig commented on GitHub (Nov 7, 2025): @sayyadirfanali I'm not @wezm or @quartztz but I think the contextual alternates option is the one that appeals to me the most! I am also not a huge fan of going full-blown triangular arrow, I would prefer to maintain separation but just make the glyphs harmonize a bit better.
Author
Owner

@quartztz commented on GitHub (Nov 7, 2025):

I think both options could look really good!!

I do feel like it would be the first "full ligature" for this font? i think two separate glyphs fits with the current direction of Myna better (what with the split => and such), and in that way I agree with @krig, but if the goal is to add more ligatures in the future then I think a unique glyph could be really stylish.

@sayyadirfanali what is your vision for this project? do you think it could be worth to start adding ligatures of this sort?

@quartztz commented on GitHub (Nov 7, 2025): I think both options could look really good!! I do feel like it would be the first "full ligature" for this font? i think two separate glyphs fits with the current direction of Myna better (what with the split `=>` and such), and in that way I agree with @krig, but if the goal is to add more ligatures in the future then I think a unique glyph could be really stylish. @sayyadirfanali what is your vision for this project? do you think it could be worth to start adding ligatures of this sort?
Author
Owner

@sayyadirfanali commented on GitHub (Nov 7, 2025):

let's go with contextual alternates first and see how they look. would take Iosevka and Pragmata Pro as a references (shorter bar close to the gt sign, no triangle). adding ligature support is definitely a possibility but i'd like to exhaust simpler options first which won't disturb the editing flow too much.

@sayyadirfanali commented on GitHub (Nov 7, 2025): let's go with contextual alternates first and see how they look. would take Iosevka and Pragmata Pro as a references (shorter bar close to the gt sign, no triangle). adding ligature support is definitely a possibility but i'd like to exhaust simpler options first which won't disturb the editing flow too much.
Author
Owner

@sayyadirfanali commented on GitHub (Nov 17, 2025):

@wezm @krig @quartztz i've added (9138e77400) a contextual alternate for |> which should display the bar a bit shorter. can you please check if it works? you may need to use a context-aware terminal to see it (or use the font in the browser).

also comment if the design is proper. eg, i've not added any horizontal shift to the right (only size change). but we can change that easily.

@sayyadirfanali commented on GitHub (Nov 17, 2025): @wezm @krig @quartztz i've added (https://github.com/sayyadirfanali/Myna/commit/9138e774006e29f18d7104f6654115b1c176013e) a contextual alternate for `|>` which should display the bar a bit shorter. can you please check if it works? you may need to use a context-aware terminal to see it (or use the font in the browser). also comment if the design is proper. eg, i've not added any horizontal shift to the right (only size change). but we can change that easily.
Author
Owner

@krig commented on GitHub (Nov 17, 2025):

Looks like this on my end:

Image

To me, this is perfect! I don't think it needs any horizontal shift, but I guess that's a matter of taste.

Thank you!

@krig commented on GitHub (Nov 17, 2025): Looks like this on my end: <img width="387" height="64" alt="Image" src="https://github.com/user-attachments/assets/5b774982-0ffc-4644-a2a2-a87f556c11c9" /> To me, this is perfect! I don't think it needs any horizontal shift, but I guess that's a matter of taste. Thank you!
Author
Owner

@wezm commented on GitHub (Nov 18, 2025):

@wezm @krig @quartztz i've added (9138e77) a contextual alternate for |> which should display the bar a bit shorter. can you please check if it works? you may need to use a context-aware terminal to see it (or use the font in the browser).

Yes this works, and is a nice improvement I think.

Image

also comment if the design is proper. eg, i've not added any horizontal shift to the right (only size change). but we can change that easily.

Personally I think a little horizontal adjustment would be good. Not so much that it turns into a triangle, but just a bit to nudge the | and > closer together.

@wezm commented on GitHub (Nov 18, 2025): > [@wezm](https://github.com/wezm) [@krig](https://github.com/krig) [@quartztz](https://github.com/quartztz) i've added ([9138e77](https://github.com/sayyadirfanali/Myna/commit/9138e774006e29f18d7104f6654115b1c176013e)) a contextual alternate for `|>` which should display the bar a bit shorter. can you please check if it works? you may need to use a context-aware terminal to see it (or use the font in the browser). Yes this works, and is a nice improvement I think. <img width="261" height="107" alt="Image" src="https://github.com/user-attachments/assets/29781cad-4d55-4868-a74e-af396edcae42" /> > also comment if the design is proper. eg, i've not added any horizontal shift to the right (only size change). but we can change that easily. Personally I think a little horizontal adjustment would be good. Not so much that it turns into a triangle, but just a bit to nudge the `|` and `>` closer together.
Author
Owner

@marcelarie commented on GitHub (Nov 20, 2025):

Personally I think that it should try to maintain the form of both text objects when used individually, and just stretch a bit the > so it's closer to the |.

@marcelarie commented on GitHub (Nov 20, 2025): Personally I think that it should try to maintain the form of both text objects when used individually, and just stretch a bit the `>` so it's closer to the `|`.
Author
Owner

@sayyadirfanali commented on GitHub (Dec 14, 2025):

@wezm @krig @marcelarie @quartztz i've finalised the design for the pipe without any changes as of now with just one change, it won't fire in the glyph combination <|>. closing this issue. feel free to open another for any other contextual alternate.

@sayyadirfanali commented on GitHub (Dec 14, 2025): @wezm @krig @marcelarie @quartztz i've finalised the design for the pipe without any changes as of now with just one change, it won't fire in the glyph combination `<|>`. closing this issue. feel free to open another for any other contextual alternate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Myna#3