Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparison ligatures & Ligature Request +=, -= #416

Open
zeg-io opened this issue May 1, 2017 · 16 comments
Open

Comparison ligatures & Ligature Request +=, -= #416

zeg-io opened this issue May 1, 2017 · 16 comments

Comments

@zeg-io
Copy link

zeg-io commented May 1, 2017

@tonsky Love the font! Not a huge fan of the === and !== (triple-line) It doesn't look as elegant as the => and == and != symbols. Are you open at all to modifying it? Not exactly sure what font capabilities are, but maybe a "bold" version of the == and != rather than triple line?

Also, not sure what it could look like, but "coolness factor" demands a ligature for += and == :)

Maybe a + in the middle of an = so it looks something like =[+]= and =[-]= but taking up two symbols, not 5 ;)

Anyway, I know everyone has opinions. Thanks for taking the time to read mine. And thanks again for the awesome font!

@tonsky
Copy link
Owner

tonsky commented May 1, 2017

Thanks Tony! There’s a ligature for == already. One of the very first ones, along with <= >= and arrows :)

@zeg-io
Copy link
Author

zeg-io commented May 1, 2017

@tonsky I know about the == love it, also <= etc. I like them. I just have to use === and !== in Javascript and don't like the way it renders :)

@dhouck
Copy link

dhouck commented May 1, 2017

I actually like them, but I know a lot of other people don’t. Would it be better if it were more balanced, instead of (depending on font size) the bars not being equally spaced?

@tonsky
Copy link
Owner

tonsky commented May 1, 2017

@zeg-io I know what you mean, actually. Maybe I’ll think of something eventually

@zeg-io
Copy link
Author

zeg-io commented May 4, 2017

3equals-ligature

Here is a a mockup I messed with a while. I wound up concluding that the simplest solution was the easiest to read. Making the = just go from "normal" like == to a bold equivalent with three ==

characters typed result (sort of)
== ==
=== == <-- bold

@dhouck
Copy link

dhouck commented May 4, 2017

I already have enough trouble telling the differences between == and =, since the glyphs look the same except for length (#383; see also the glyph for --, which does not look like one long bar). Adding in another which is almost the same except bold would be even worse, especially since many editor themes already display operators in bold.

@zeg-io
Copy link
Author

zeg-io commented May 4, 2017

Well, the option listed there (bold with a little pip cut out) might work too. Maybe two cut outs for the === sign?

I actually believe that the double-thick equals stands out pretty clearly, but I'd go for almost any other solution ;)

@wopian
Copy link
Contributor

wopian commented May 4, 2017

The fact it stands out while bold shows it's not coherent with the rest of the typeface 🙁

Besides that, the triple barred === is easy to differentiate while scanning code. This one requires me to compare it against characters above/below it to check it's === and not ==

@realnc
Copy link

realnc commented Jun 11, 2017

Thanks for this font!

I switched to Fira Code from DejaVu Sans Mono. I code a lot of C and C++, and I miss the balanced "+=" and "-=" which are used a lot there. In Fira Code, they look unbalanced (the "+" and "-" is not centered vertically on the "="). So even if you won't add ligatures for these, it would be nice to have the "=" centered regardless. It just looks completely off compared to DejaVu Sans Mono.

@realnc
Copy link

realnc commented Jun 11, 2017

OK, never mind. I deleted the *.ttf versions of the fonts and instead installed the *.otf files. "+=" and "-=" now look centered.

No idea what's causing this though. Is there a difference in the fonts themselves, or does FreeType (I'm on Linux) render these differently?

@tonsky
Copy link
Owner

tonsky commented Jun 12, 2017

@realnc it’s probably a feature conflict there. I have a “aligned math” feature when math operators (+, -, *, = etc) align slightly differently if surrounded by lowercase letters. So if you type += it’ll look fine. But if you type a+= you’ll see + height to be adjusted a little but = stays at the same height, becoming unbalanced. I’ll deal with that in the next version

@realnc
Copy link

realnc commented Jun 12, 2017

@tonsky Weird thought that it appears to behave differently between the TTF and OTF version.

Generally, which should be preferred? (I would assume OTF is the better format compared to TTF?)

Edit: Also, usually "+=" (and friends) is used with spaces around it. That is "a += 2" instead of "a+=2". (Or at least if not "usually" then "by many people.")

@tonsky
Copy link
Owner

tonsky commented Jun 12, 2017

I’m under impression that OTF works better on Mac and TTF works better on Windows but I wound’t vouch for it. In theory, both formats support all the features

@zrd
Copy link

zrd commented Jun 17, 2017

I would also like to voice my support for += and -= ligatures. Other than that, I love everything about this font. Thanks to all the contributors.

@pykong
Copy link

pykong commented Oct 11, 2017

With the recently added support for ligatures on Sublime Text, adding ligatures for += and -= get even more important. Sublime Text is one of today's most popular code editors, featuring python as its extension, therefore be used by many python developers.

I have no idea, though how the ligatures for those symbols should look like.

@1e1001
Copy link

1e1001 commented Jun 18, 2019

there already is a ligature for /=, so i'd say *= could also get one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants