googlefonts / Inconsolata

Development repo of Inconsolata Fonts by Raph Levien
http://levien.com/type/myfonts/inconsolata.html
SIL Open Font License 1.1
1.32k stars 64 forks source link

Ligatures for !==, ===, and => #17

Closed appsforartists closed 6 years ago

appsforartists commented 6 years ago

There are three ligatures that are useful for JS development that I'd love to see in Inconsolata. I've started implementing them (and will be testing them locally).

screen shot 2018-02-26 at 10 51 14 am

Would you accept a PR that included them?

theevangelista commented 6 years ago

I know little about font design, but wouldn't be easier to use FiraCode's ligatures and patch it on Inconsolata ?

appsforartists commented 6 years ago

But why? Inconsolata is its own font. Having its own ligatures feels better both for the font and for the programming font ecosystem than frankensteining-on somebody else's glyphs.

theevangelista commented 6 years ago

Because they already support a lot of ligature for different programming languages. But I also agree that would be nice to Inconsolata to have its on design. I really like the equality signs

appsforartists commented 6 years ago

Thanks.

Personally, I'm only interested in adding ligatures for JavaScript. (Of course, other designers are welcome to submit their own ligatures too.) I actually like that we're only adding triple equals (rather than both double and triple, as in Fira) because it makes it obvious when you've forgotten the third one.

alexeiva commented 6 years ago

@appsforartists you are welcome to PR. Here are Build Instructions

@raphlinus mentioned on d-ligatures in this discussion:

When doing "programmer ligatures", I think it's important that the ligature doesn't affect the metrics. So if you're making a "->" ligature, it needs to be a long arrow, twice the normal width. (on second reading, this might not be an issue in what you've actually done, but just throwing it out there).

appsforartists commented 6 years ago

Glad to hear it! I'll open one. 😃

alexeiva commented 6 years ago

We can make this feature default and include a patch script that removes dligs for users that do not need it. There is a similar script here:

appsforartists commented 6 years ago

Thanks again @alexeiva - I also made ligatures for <= and >= and opened a PR.

theevangelista commented 6 years ago

Can I ask for two ligatures? Would be nice to have the simple arrow for both directions -> <-, for kotlin, java, some elixir

alexeiva commented 6 years ago

@appsforartists The widths of ligatures are fine: double or triple the normal size.

I fixed a few things:

Here is v.2.010 release