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

Ligatures and contextual alternatives #64

Closed
flying-sheep opened this issue Jan 28, 2016 · 29 comments
Closed

Ligatures and contextual alternatives #64

flying-sheep opened this issue Jan 28, 2016 · 29 comments

Comments

@flying-sheep
Copy link

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
Copy link

vviikk commented Nov 5, 2016

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

@SethGunnells
Copy link

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
Copy link

rebo commented Dec 31, 2017

Great font but ligatures are the future !

@belluzj belluzj mentioned this issue Jan 7, 2018
@belluzj
Copy link
Owner

belluzj commented Jan 7, 2018

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:

  • Is the behaviour of the font indeed satisfactory while editing code with ligatures?
  • Are the currently implemented ligatures correct? (especially the F# pipes and Haskell ones, because I have no knowledge of their semantics or intended use)
  • Which other ligatures are really needed? (I feel that some of the ligatures from Fira Code such as <+> or <*> are not really needed here because my + and * are already big enough and almost centered vertically (OK not exactly).

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
Copy link

SethGunnells commented Jan 8, 2018

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
Copy link
Owner

belluzj commented Jan 8, 2018

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
Copy link

Yes and yes.

@SethGunnells
Copy link

SethGunnells commented Jan 8, 2018

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
Copy link
Owner

belluzj commented Jan 8, 2018

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

And check that ligatures work there?

spectacle lh9590

@SethGunnells
Copy link

SethGunnells commented Jan 8, 2018

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
Copy link
Owner

belluzj commented Jan 8, 2018

ok great :)

@nikolalukovic
Copy link

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

@joewreschnig
Copy link

joewreschnig commented Jan 27, 2018

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

  • Of the ligatures in Fira Code, I'd also like to see .= (to center the dot), /= (same as "not equal to" in some Lisp languages), and =~ (replace the top bar with a wavy line).

  • Today I use a variant font, Fira Code Symbol, which doesn't use "real" ligature support but places the combined glyphs at PUA codepoints. Then I use editor support to map replacements on a per-language basis. So "===" appears as a ligature in JavaScript but not C, etc. As far as I know this is not possible with "real" ligatures, which are always global. Would it be possible to ship a variant of the font with ligatures disabled but still contains the glyphs in the PUA range? (For Fira Code Symbol, they begin at U+E100.)

@vviikk
Copy link

vviikk commented Mar 12, 2018

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
Copy link

NOBLES5E commented Jun 8, 2018

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

@DrBearhands
Copy link

DrBearhands commented Jun 21, 2018

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
Copy link

pfgray commented Oct 21, 2018

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

screen shot 2018-10-21 at 10 28 24 am

@theevangelista
Copy link

theevangelista commented Jan 10, 2019

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
Copy link

macdems commented Jan 12, 2019

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

@radiosilence
Copy link

Ok, these are looking amazing :)

@Bradcomp
Copy link

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
Copy link
Owner

belluzj commented Nov 16, 2019

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 #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
Copy link

f2l2pe commented Nov 18, 2019

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

@MaskRay
Copy link

MaskRay commented Nov 19, 2019

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
Copy link
Owner

belluzj commented Nov 19, 2019

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
Copy link

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
Copy link
Author

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

@dantezhu
Copy link

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

1 similar comment
@dantezhu
Copy link

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

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