be5invis / Iosevka

Versatile typeface for code, from code.
http://be5invis.github.io/Iosevka
SIL Open Font License 1.1
19.36k stars 579 forks source link

Turbofish ligation #1889

Open Piturnah opened 1 year ago

Piturnah commented 1 year ago

Would be nice to have in Rust where the syntax ::<T> is used often to specify a type in place of a generic. Victor Mono supports this ligation: image

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 15 days.

Piturnah commented 1 year ago

Bump

be5invis commented 1 year ago

Doing a ligation like looks very odd. It may confuse people (|>< or ::<?) so are there second font that has this ligature?

Piturnah commented 1 year ago

Doing a ligation like looks very odd. It may confuse people (|>< or ::<?) so are there second font that has this ligature?

There's none that I know of, and searching the web for "turbofish ligation" just comes up with this issue and #1375, unfortunately...

Doing a ligation like looks very odd. It may confuse people (|>< or ::<?)

Definitely see what you mean here. However, I'm not personally aware of any syntax that uses |><, whereas in Rust the ::< is very common.

I would agree that it may be sensible to have this ligation disabled by default, though, just in case.

lf94 commented 3 weeks ago

I think this is not a great suggestion. ::< converting to something that looks nothing like the original separate glyphs is confusing. A font should be clear as day what its user is trying to convey.

Piturnah commented 2 weeks ago

I think this is not a great suggestion. ::< converting to something that looks nothing like the original separate glyphs is confusing. A font should be clear as day what its user is trying to convey.

I do agree that a font should be very clear as to what its user is trying to convey. However, I think that context is important here. Namely, I don't think it is strictly true that clarity is improved by having the ligature look as similar as possible to the separate glyphs

Ligations in written natural languages often don't look quite like the letters written separately. For example, take arabic aliph (ا) and laam (ل) to form لا‎ (noting that Arabic is written right to left). Whether a particular ligation is confusing or not is very context sensitive. For Rust users, the ::< syntax is very common, and indeed its ugliness/noisiness is often complained about, something which is improved by having a ligation which simplifies and declutters it.

Of course, someone who is not a Rust user may question what they're seeing if they were to stumble upon this ligation. But then, that user would not have enabled this ligation when they compiled their Iosevka version.

lf94 commented 2 weeks ago

Ah, making it an option to toggle surely is no harm. Disregard my concerns then :)

astrolemonade commented 2 weeks ago

@be5invis can you add the following to the backlog as well https://github.com/be5invis/Iosevka/issues/2411? It's very common in Rust.