# Fira Code Font and Ligatures for Julia

**URL:** <https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367>\
**Category:** Offtopic\
**Created:** [February 27, 2018, 3:01pm UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367 "2018-02-27T15:01:54Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [February 27, 2018, 3:01pm UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/1 "2018-02-27T15:01:54Z")

</div>

The Fira Code font ([GitHub - tonsky/FiraCode: Free monospaced font with programming ligatures](https://github.com/tonsky/FiraCode)) just got some more Julia specific ligatures! I think some of them are pretty neat.

![Screenshot_2018-02-27_15-56-33](https://global.discourse-cdn.com/julialang/original/3X/f/f/fff55373cca85e8a720a0f59fc05a40227ac1f21.png)

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [February 27, 2018, 11:44pm UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/2 "2018-02-27T23:44:49Z")

</div>

Thanks, this is awesome! Works in iTerm2 in my VIM without any problems… 😃

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [February 28, 2018, 8:28am UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/3 "2018-02-28T08:28:37Z")

</div>

doesn’t work in emacs though ☹, at least not without a hack: [https://github.com/tonsky/FiraCode/issues/211#issuecomment-239087391](https://github.com/tonsky/FiraCode/issues/211#issuecomment-239087391)

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [February 28, 2018, 8:31am UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/4 "2018-02-28T08:31:35Z")

</div>

there exist ligatures for `.=` and `.-`, where can I get a complete list of infix and unary operators?

---

<div class="post-metadata">

**Author:** ![DNF](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dnf/32/10191_2.png) [@DNF](https://discourse.julialang.org/u/DNF)\
**Post date:** [February 28, 2018, 9:29am UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/5 "2018-02-28T09:29:58Z")

</div>

Fira Code is my goto font, and it’s great. One weakness for Julia coders is the inconsistent ligatures for dotted operators, e.g. `.-` vs `.+`, which is a bit of a wart:

![26](https://global.discourse-cdn.com/julialang/original/3X/7/4/7436b1b7ff66d029970ac0b54d816d74c2153414.png)

Also, ligatures don’t seem to work in the new Juno REPL, while they _do_ work in the ordinary terminal REPL on MacOS.

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [February 28, 2018, 10:22am UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/6 "2018-02-28T10:22:06Z")

</div>

> [@DNF](#):
>
> Fira Code is my goto font, and it’s great. One weakness for Julia coders is the inconsistent ligatures for dotted operators, e.g. .- vs .+, which is a bit of a wart:

I was going to open an issue because of that, I just need a complete list.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 28, 2018, 10:25am UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/7 "2018-02-28T10:25:17Z")

</div>

does it work with the hack though?

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [February 28, 2018, 10:28am UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/8 "2018-02-28T10:28:01Z")

</div>

> [@DNF](#):
>
> Also, ligatures don’t seem to work in the new Juno REPL, while they do work in the ordinary terminal REPL on MacOS.

Upstream issue, in case you want to track it:

> <https://github.com/xtermjs/xterm.js/issues/958>
>
> Support being removed in https://github.com/sourcelair/xterm.js/pull/938
> 
> It's… certainly still possible, the renderer needs to know which characters to join though.

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [February 28, 2018, 10:37am UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/9 "2018-02-28T10:37:08Z")

</div>

Haven’t tried it myself, but apparently it works partially.

---

<div class="post-metadata">

**Author:** ![lobingera](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lobingera/32/211_2.png) [@lobingera](https://discourse.julialang.org/u/lobingera)\
**Post date:** [February 28, 2018, 11:50am UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/10 "2018-02-28T11:50:22Z")

</div>

maybe offtopic on offtopic: Is there a linux/X11 (or wayland) counterpart of iTerm2?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [February 28, 2018, 11:59am UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/11 "2018-02-28T11:59:13Z")

</div>

What feature(s) do you need specifically? Looking at [their list](https://iterm2.com/features.html), most of it is done by a collection of tools, eg [tmux](https://github.com/tmux/tmux/wiki) (in any terminal emulator, I use `xfce4-terminal`).

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [February 28, 2018, 1:24pm UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/12 "2018-02-28T13:24:10Z")

</div>

> [@gdkrmr](#):
>
> I was going to open an issue because of that, I just need a complete list.

There are a lot of them… Julia allows dots to prefix nearly all binary operators, which includes a large number of Unicode characters. See all of the operators grouped under `(add-dots ....)` here:

> <https://github.com/JuliaLang/julia/blob/master/src/julia-parser.scm#L9-L36>

In addition to that, you can also use these operators with combining characters (dots, hats, macrons, etc).

The most important ones are probably the dottable operators with a built-in definition in Base:

```julia
= += -= *= /= //= |\\=| ^= ÷= %= <<= >>= >>>= \= &= ⊻=
> < >= ≥ <= ≤ == === ≡ != ≠ !== ≢ ∈ ∉ ∋ ∌ ⊆ ⊈ ⊂ ⊄ ⊊ ≈ ≉
+ - | ⊻
<< >> >>>
* / ÷ % & ⋅ ∘ × \ ∩
// ^

```

(Some of these operators, like `≉` and `≢`, don’t even have glyphs without dots in common fonts, e.g. the font I’m seeing in my browser right now. Also, some fonts mess up operators with combining characters, e.g. `+̂` is not combined in many fonts.)

You might also want a ligature for `.(` for dotted function calls like `f.(x)`.

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [February 28, 2018, 1:32pm UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/13 "2018-02-28T13:32:59Z")

</div>

I’m not sure that the ligatures for dotted operators are such a great idea, though. For example, how would `.⋅` appear if you defined a ligature similar to the one you have for `.-`? The raised dot in your ligature looks an awful lot like a multiplication operator.

Note also that `<<=` is an assignment operator in Julia and many other languages, and the current ligature doesn’t reflect this ([https://github.com/tonsky/FiraCode/issues/560](https://github.com/tonsky/FiraCode/issues/560)).

The other problem I have when looking at some of these ligatures is that if I’m looking at someone’s code and see a non-obvious ligature, I might not know how to type it. My first guess would be that it is some Unicode character (Julia supports a lot of those and they are common in Julia code), not a ligature.

Note also that `-> => ⟶ ⟹` are all distinct operators in Julia. It seems that your ligatures make the first two look very similar to the latter two, which is a problem. (Filed [https://github.com/tonsky/FiraCode/issues/559](https://github.com/tonsky/FiraCode/issues/559)) This illustrates the general danger of mixing fancy ligatures with a language that supports both ASCII and Unicode operators.

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [February 28, 2018, 2:03pm UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/14 "2018-02-28T14:03:21Z")

</div>

I have very little knowledge about ligatures and how the substitution actually works. I know that there are switches called font features that can turn on and off certain ligatures, it would probably make sense to have a `julia font feature` that is aware of these things.

Looking at all the possible operators in Julia it is possible to write really confusing code only by using similarly looking Unicode operators. 😀

---

<div class="post-metadata">

**Author:** ![gdkrmr](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdkrmr/32/2791_2.png) [@gdkrmr](https://discourse.julialang.org/u/gdkrmr)\
**Post date:** [February 28, 2018, 2:03pm UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/15 "2018-02-28T14:03:54Z")

</div>

thanks for pointing me there!

---

<div class="post-metadata">

**Author:** ![LaszloH](https://avatars.discourse-cdn.com/v4/letter/l/fbc32d/32.png) [@LaszloH](https://discourse.julialang.org/u/LaszloH)\
**Post date:** [October 3, 2018, 10:02pm UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/16 "2018-10-03T22:02:18Z")

</div>

I have a related question: Does anyone know a Windows ttf monospace font, which can display the most basic Julia Unicode characters, like \xor, \euler, \in… in the REPL? It is quite sad, that these are only shown by 2 otherwise terribly looking standard Windows fonts: MS Gothic and NSimSun. (MS Gothic even replaces ‘\’ with a crossed over ‘Y’.)

---

<div class="post-metadata">

**Author:** ![alandion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alandion/32/5591_2.png) [@alandion](https://discourse.julialang.org/u/alandion)\
**Post date:** [October 4, 2018, 12:00am UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/17 "2018-10-04T00:00:09Z")

</div>

usually I’m working in Juno and unicode is displayed fine (inline and in REPL)

On windows, a solution for a standalone command line is to use conemu/cmder, and set a font under “Alternative Font” which is used for unicode glyphs.

I’ve found that [GNU Unifont Glyphs](http://unifoundry.com/unifont/index.html) has all the things.

---

<div class="post-metadata">

**Author:** ![LaszloH](https://avatars.discourse-cdn.com/v4/letter/l/fbc32d/32.png) [@LaszloH](https://discourse.julialang.org/u/LaszloH)\
**Post date:** [October 4, 2018, 1:55am UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/18 "2018-10-04T01:55:59Z")

</div>

Thanks, Alan. Unifont as alternative font works in ConEmu! Unfortunately, it seems to be a low resolution raster font, and so some glyphs are not recognizable, but it has all the symbols I need.

I keep on looking for nicer, truly scalable fonts, and would appreciate more suggestions.

---

<div class="post-metadata">

**Author:** ![LaszloH](https://avatars.discourse-cdn.com/v4/letter/l/fbc32d/32.png) [@LaszloH](https://discourse.julialang.org/u/LaszloH)\
**Post date:** [October 4, 2018, 2:36am UTC](https://discourse.julialang.org/t/fira-code-font-and-ligatures-for-julia/9367/19 "2018-10-04T02:36:13Z")

</div>

…I found FreeMono: [http://www.fontspace.com/gnu-freefont/freemono](http://www.fontspace.com/gnu-freefont/freemono). It has much fewer glyphs, but the included ones are beautiful.
