Fonts with consistent ligature support for Julia

I’ve used JetBrains Mono for coding before and I kept using it for Julia, but I’m not happy with some ligatures, especially the dot operator:

dot-ligature

There was a post mentioning the same issue with Fira Code (Fira Code Font and Ligatures for Julia). Has anyone found a font with more consistent ligatures?

1 Like

This is a great summary of good fonts to try in case you haven’t seen it (although I haven’t found any that don’t have at least one odd ligature issue):

There was also some questions about this on e.g. the Fira repo,

and someone lists pretty detailed instruction how one might go about compiling a custom version of the font with customized ligatures. It would be awesome if someone made a Julia-specific version and could share it!

2 Likes

Thanks for your usefull comments, how can I install JetBrain Mono or Fira Code front in VScode ?

FYI, I have a fork here, where I removed some of them manually.

2 Likes

Follow https://www.jetbrains.com/lp/mono/#how-to-install to install the font for your OS. In VS Code, go to Settings -> Editor: Font Family and select JetBrains Mono.

You can also manually edit settings.json file. Here is the part with font configuration I have:

    "editor.fontFamily": "JetBrains Mono",
    "editor.fontLigatures": true,
1 Like

As a general remark about ligature-heavy fonts for Julia, see this comment from one of the FiraCode authors:

Fira Code is for languages that don’t support Unicode and resort to ASCII pseudo-graphics instead, for historical or other reasons. If you can use full Unicode range, I definitely recommend that (I believe that’s the future) and you probably don’t need something like Fira Code

3 Likes

Can I have != and -> in Julia as:
lig
without resorting to font ligatures?

Yes, I can! \ne and the other one I still have to find.

\to or \rightarrow, but Julia parser doesn’t seem to allow them as ->.

2 Likes

is a distinct operator in Julia (along with the other arrows, like or ), that you can define as whatever function you want.

2 Likes

I use Iosevka with Sublime Text. https://github.com/be5invis/Iosevka Its an open source font, so there is plenty to configure :slight_smile:

2 Likes

How does the new JuliaMono compare?

1 Like

https://github.com/cormullion/juliamono/issues/3 it’s broken on Windows FYI

The Irreal blog had a nice post today about coding fonts, linking two sites which provides comparison samples (both include Julia Mono).

4 Likes

Thanks for the links! I think the DevFonts is better, because it shows an editable text box.

There’s also ProgrammingFonts

So many ways to procrastinate… :smiley:

4 Likes