FiraCode icon indicating copy to clipboard operation
FiraCode copied to clipboard

Request for approximately equals ligature

Open Fresheyeball opened this issue 9 years ago • 11 comments

~== and =~= would both be nice as

or

at the same width as the == ligature now.

Fresheyeball avatar Feb 22 '16 17:02 Fresheyeball

I can't change the width: it's one of the main principles of Fira Code: don't break character widths, don't break intendation.

What language are these ligatures for?

On Mon, Feb 22, 2016, 23:28 Isaac Shapira [email protected] wrote:

~== and =~= would both be nice as

https://camo.githubusercontent.com/10587acb5ae8efcc95397c0871ca6b4da4662e53/687474703a2f2f7777772e6465636f6465756e69636f64652e6f72672f64652f646174612f676c7970682f313936783139362f323234352e676966

or

https://camo.githubusercontent.com/7c4c4a0ef495aad2b6d5ca90dabe17965a73880a/687474703a2f2f7777772e6465636f6465756e69636f64652e6f72672f646174612f676c7970682f313936783139362f323234382e676966

at the same width as the == ligature now.

— Reply to this email directly or view it on GitHub https://github.com/tonsky/FiraCode/issues/143.

tonsky avatar Feb 22 '16 17:02 tonsky

Well, I don't think you need to change the width, since ~= is 2 wide and =~= is 3 (so there is room for a 2 wide ligature in the 3 wide space). As for language, none where these are built in (that I know of), but these are frequently defined in user space in languages that allow custom infixes, for example: https://hackage.haskell.org/package/ieee754-0.7.8/docs/Data-AEq.html

Fresheyeball avatar Feb 22 '16 17:02 Fresheyeball

Oh, I see what you mean. What’s semantic difference between ~== and =~=? I’m not sure how glyphs you provided are related to the operators

tonsky avatar Feb 22 '16 18:02 tonsky

In Perl 6, =~= means approximately equal. However, Perl 6 also supports the unicode version .

MadcapJake avatar Feb 22 '16 18:02 MadcapJake

No semantic difference Im aware of. Just different versions Ive seen in the wild for approximate equality.

Fresheyeball avatar Feb 22 '16 21:02 Fresheyeball

The glyphs I provided where more just visual options for approximate equality. Id expect a single glyph to be select to represent the meaning, and be used for both operators flavors.

Fresheyeball avatar Feb 22 '16 21:02 Fresheyeball

That would be a terrible idea, given that both versions are used in Haskell community

On Tue, Feb 23, 2016 at 3:23 AM Isaac Shapira [email protected] wrote:

The glyphs I provided where more just visual options for approximate equality. Id expect a single glyph to be select to represent the meaning, and be used for both operators flavors.

— Reply to this email directly or view it on GitHub https://github.com/tonsky/FiraCode/issues/143#issuecomment-187388978.

tonsky avatar Feb 22 '16 21:02 tonsky

I think that can be addressed with configurability. But good point. Maybe just the more common =~= by default.

Fresheyeball avatar Feb 22 '16 21:02 Fresheyeball

Layman's comment: +1 for some ligature that denotes approximately equals -- right now I don't see any? I'm used to seeing ~= used in the wild (though not necessarily in coding contexts).

airstrike avatar Oct 09 '23 19:10 airstrike

I’d appreciate having just for those cases where a roughly (or almost) equals sign would apply. Even if that would almost never happen.

ThePizzaMuncher avatar Jan 15 '24 17:01 ThePizzaMuncher

Necro thread, let's gooo! I defaulted to trying to use ~=, then =~, then =~=. I was surprised that none of these worked. At which point, I thought I'd jump online and look it up because I think getting the character/presentation correct is important.

Seeing that there is no ligature for feels incomplete.

ragaar avatar Aug 01 '24 01:08 ragaar