adobe-fonts / source-code-pro

Monospaced font family for user interface and coding environments
https://adobe-fonts.github.io/source-code-pro/
SIL Open Font License 1.1
19.73k stars 1.62k forks source link

Is any chance to support ligatures? #273

Open zkcloud opened 3 years ago

zkcloud commented 3 years ago

Recently, found that ligatures in code is very useful, it's more readable and friendly.

So, if ,is any plan?

pauldhunt commented 3 years ago

I have thought about it a bit but as I don’t use any languages where for me ligatures would be particularly useful, it's hard to know which actually help improve legibility and which are simply stylistic preferences of individual coders. Since you are proposing this feature, can you please give me more context? what language are you using? which ligatures do you find particularly useful? having a better understanding of this type of information would make it more likely for me to include coding ligatures sooner rather than later.

jonesnc commented 3 years ago

@zkcloud You can download a patched version of this font that includes ligatures from the Ligaturizer project:

https://github.com/ToxicFrog/Ligaturizer/releases/tag/v4

pauldhunt commented 3 years ago

@jonesnc Based on the terms of the Source fonts license, will you please also change the name of the patched version to NOT use the name Source? the license allows for modification and redistribution, but retains the name Source Code for Adobe’s official version. I’ll post this comment also on the Ligaturizer project page.

DarrienG commented 3 years ago

This is probably a duplicate: https://github.com/adobe-fonts/source-code-pro/issues/198

zkcloud commented 3 years ago

I have thought about it a bit but as I don’t use any languages where for me ligatures would be particularly useful, it's hard to know which actually help improve legibility and which are simply stylistic preferences of individual coders. Since you are proposing this feature, can you please give me more context? what language are you using? which ligatures do you find particularly useful? having a better understanding of this type of information would make it more likely for me to include coding ligatures sooner rather than later.

I use Java more. A few of the usual ones will suffice. Like, ==, !=, ===, >=, <=, ->, :=, <!--. You may refer to JetBrains Mono, as a reference. But I still used to Source Code Pro. If it's supported, I'm sure most people would be very happy. :)

zkcloud commented 3 years ago

Generally, in most languages, these would be enough:

jwkohnen commented 3 years ago

I assume the above is a screenshot of Jetbrains font test scratch pad with the following non-ligatured characters:

abcdefghijklmnopqrstuvwxyz
ABCDEFGHIJKLMNOPQRSTUVWXYZ
 0123456789 (){}[]
 +-*/= .,;:!? #&$%@|^

<!-- -- != := === >= >- >=> |-> -> <$>
</> #[ |||> |= ~@
jonesnc commented 3 years ago

@jonesnc Based on the terms of the Source fonts license, will you please also change the name of the patched version to NOT use the name Source? the license allows for modification and redistribution, but retains the name Source Code for Adobe’s official version. I’ll post this comment also on the Ligaturizer project page.

I'm not a maintainer on that project. I was merely linking to it in an effort to be helpful.

jonesnc commented 3 years ago

Actually, the name of the patched font is LigaSrc. Is Src different enough from Source?

pauldhunt commented 3 years ago

@jonesnc Yes, I think so. Thanks for reporting back.

yvvt0379 commented 3 years ago

Then I wonder if you are going to add the ligature feature to the font.

pauldhunt commented 3 years ago

@CodeCrazy-ywt 🚧

yvvt0379 commented 3 years ago

But I just don't know what you mean by just an emoji...😟Could you explain your ideas more clearly?

pauldhunt commented 3 years ago

@CodeCrazy-ywt coding ligatures are under construction.

yvvt0379 commented 3 years ago

OK, I see. Best news I've ever heard of! Big thanks!👍🏻

pauldhunt commented 3 years ago

@CodeCrazy-ywt just for my info, which set of ligatures in particular are you wanting to see supported?

yvvt0379 commented 3 years ago

You can refer to Fira Code or Jetbrains Mono as a reference.

Scemist commented 2 years ago

Do you know the Hasklig? Is one of the most famous font with ligatures for coding. It's literally the Source Code Pro, but with ligatures added. The repository is here in GitHub.

Source Code is my favorite monospaced font, and i use Hasklig as well.

yvvt0379 commented 2 years ago

But, we need general, not specific to just one programming language. Hasklig is specifically designed for Haskell language.

yashLadha commented 1 year ago

I see that in the latest release also there is no ligature support. Is this issue being tracked in any other release?

cc: @pauldhunt

yashLadha commented 5 months ago

@pauldhunt Sorry to ping you, but is there an update on this? Or any other action items we are currently working on?

Again, I appreciate all the work that you and your team have put into this project. 😄

nmsmith commented 3 months ago

If this font adds support for ligatures at some point, may I suggest being conservative? Many fonts that support ligatures go crazy, supporting all kinds of weird glyph pairs that aren't relevant for the most popular languages, and whose aesthetics are questionable. I'm talking about stuff like #{. (Fira Code is the prime example.)

Also, I strongly dislike the tendency of fonts to join a pair of underscores __ into one "mega-underscore". IMO this doesn't look better; it just obfuscates the number of underscores. Most fonts don't join -- into a "mega minus", and it would be preposterous to suggest joining .. into a "mega dot", so I don't see the rationale for joining underscores together. (In most programming languages, underscores are used in the same manner as a letter; they aren't used as underlines.)

In comparison, ligatures such as <= (inequality) and -> (right arrow) are much more justifiable, because they replace "ASCII art" with a semantically-correct symbol.

If others are interested in having access to the long tail of questionable ligatures, I would propose hiding these behind stylistic sets. This would allow people to choose the combination of ligatures that they like best.

Also, I'd love to see "texture healing" (discussed here) as a stylistic set.

pauldhunt commented 3 months ago

@yashLadha this project is currently on hold while I finish up some other projects. sorry for the delay.

Merovex commented 2 months ago

How about if we slip you a dollar? ;)