belluzj / fantasque-sans

A font family with a great monospaced variant for programmers.
http://openfontlibrary.org/en/font/fantasque-sans-mono
SIL Open Font License 1.1
6.98k stars 154 forks source link

Ligatures and contextual alternatives #64

Closed flying-sheep closed 4 years ago

flying-sheep commented 8 years ago

love your font, but having tasted the beauty that is Fira Code’s ligatures, i can’t go back.

having both fantasque and those ligatures would be perfection!

the contextual alternatives are also amazing: having e.g. the * in *ptr and - in foo-bar adjusted based on the height of the characters next to them… yum!

vviikk commented 7 years ago

Please. Your font looks gorgeous :) Only thing stopping me is Ligatures.

SethGunnells commented 6 years ago

I cannot upvote this enough. This is my favorite font to use for all my monospace needs, but I'm using Fira Code right now because I love the ligatures. Having them in this font would be wonderful and I would be back immediately. I will even pay to see this happen!

rebo commented 6 years ago

Great font but ligatures are the future !

belluzj commented 6 years ago

I have started working on this. Here is my work-in-progress on the Regular. The yellow highlights indicate which ligatures have a special combined glyph in this font, compared to all the ligatures that are handled by Fira Code and Hasklig.

spectacle s12265

I have reused the same techniques as Fira Code, so the font should have the same behaviour while editing. Only the Regular weight has ligatures for now. You can grab a test copy here: https://github.com/belluzj/fantasque-sans/releases/tag/v1.8-alpha

To continue, I would need feedback on those points:

When all is fine on the regular I will do the same for the bold and italic and release. Thanks in advance for your feedback.

SethGunnells commented 6 years ago

Thank you for working on this! I am so excited to see ligatures coming to my favorite font!

I am trying it right now in Atom, but am having no luck. Ligatures don't seem to be appearing anywhere.

Edit: I tried both OTF and TTF with no luck.

belluzj commented 6 years ago

Did you download the font from this page? https://github.com/belluzj/fantasque-sans/releases/tag/v1.8-alpha Did you check in the regular weight (not bold, not italic)?

Thanks for trying it out :)

SethGunnells commented 6 years ago

Yes and yes.

SethGunnells commented 6 years ago

Tried it in TextEdit this time to confirm it wasn't Atom crapping out. Here's the results.

image

Edit: Not sure how to confirm I definitely have the right font. I did click the link and download the FantasqueSansMono-Normal.zip file. I am 90% sure I correctly replaced the current regular weight font with the new one.

belluzj commented 6 years ago

Can you drag and drop the TTF on that page: http://www.impallari.com/testing/

And check that ligatures work there?

spectacle lh9590

SethGunnells commented 6 years ago

Nevermind! Turns out I was not replacing the font correctly. I needed to remove it completely from Font Book and add the new one for it to work properly. Here it is working!

image

Thank you for doing this! It looks amazing!

belluzj commented 6 years ago

ok great :)

nikolalukovic commented 6 years ago

Nice work on ligatures! When are you planning an official release?

joewreschnig commented 6 years ago

I'm very happy to see this going in. Two requests:

vviikk commented 6 years ago

While we're waiting for full ligature support, (which looks awesome!) you can use https://github.com/lemeb/a-better-ligaturizer to add ligatures from another font. Works great.

NOBLES5E commented 6 years ago

This is awesome. It will be great if we also have emacs instructions https://github.com/tonsky/FiraCode/wiki/Emacs-instructions

DrBearhands commented 6 years ago

I seem to be missing the ligature for /= in Elm (should be the same as the more popular != in other languages), which I did have with firacode, though that might be a configuration error on my part.

pfgray commented 5 years ago

Is it intentional that the ligatures show up in "normal" and not "italic"?

screen shot 2018-10-21 at 10 28 24 am
theevangelista commented 5 years ago

I think ligatures are only drawn to regular/normal, there is no other variant yet, thus you get only on regular formatting

I have started working on this. Here is my work-in-progress on the Regular.

macdems commented 5 years ago

I would love to have small x in hexagonal numbers: 0xff like 0×ff

radiosilence commented 5 years ago

Ok, these are looking amazing :)

Bradcomp commented 5 years ago

I just wanted to say that I have been using the ligatures for Javascript coding for the last few months. It looks great and I haven't run into any issues. Thank you for this amazing font.

One that I liked having from Blackfont is the ligature for //. It's certainly not critical, but it makes comments a bit easier to read by putting the slashes close together with a little space after them.

I totally know that's probably not one to prioritize over the other suggestions here though.

belluzj commented 4 years ago

Hello ligatures-lovers!

I just published a new version that adds a bunch of ligatures to all weights, including those contributed by @artem-ogre in https://github.com/belluzj/fantasque-sans/pull/114 (with tweaks).

Please report any issues with the existing ligatures.

I know that I didn't implement all the requests from above, and if you find more ligatures that are missing, you can add them to this thread. However I don't think that I'll be adding any more of those myself, at least for the time being (meaning the next couple years probably).

f2l2pe commented 4 years ago

Can we have a version without ligatures? I can't disable them on Visual Studio , only Code has this option

MaskRay commented 4 years ago

A version without ligatures will be great. I was bring up a new computer today and downloaded a new version. The ligatures made me wonder if I typed something wrong.

belluzj commented 4 years ago

The new version only adds ligatures, so if you don't want them you can keep the old version for now. Next release I'll add packages without the ligatures.

alexeyten commented 4 years ago

Just for information. To disable ligature on Linux (since my terminal doesn't support them) I use following config adapted from Archlinux wiki

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="font">
        <test name="family" compare="eq">
            <string>Fantasque Sans Mono</string>
        </test>
        <edit name="fontfeatures" mode="assign_replace">
            <string>calt off</string> <!-- disable ligatures -->
            <string>ss01</string> <!-- k without loop -->
        </edit>
    </match>
</fontconfig>
flying-sheep commented 4 years ago

Great stuff, thank you @belluzj! The latest release contains ligatures, so I’ll close this issue.

dantezhu commented 3 years ago

hi, please add a no-ligatures version~, thanks!

dantezhu commented 3 years ago

hi, please add a no-ligatures version~, thanks!