
Fira Code: monospaced font with programming ligatures - vdaniuk
https://github.com/tonsky/FiraCode
======
foz
As a developer, I have spent years writing and learning to parse the meaning
of sequences like ==, ===, <=, ~=, and so on. For nearly all of us, the
ligatures in this font are completely new. I think it's a creative and
interesting idea, but it means re-training my brain to recognize them, which
would take time.

And even if I could get my preferred editors to work with it, I would see the
traditional symbols when reading code on the web, or pairing with another
developer who does not use the font. It seems like a barrier to understanding,
something that by nature developers strive to eliminate.

I'm torn. This idea could be something that changes how we all express code
symbolically, or it will just become a fad that a tiny percentage of
developers will insist on using, to the frustration of everyone else.

~~~
tonsky
Let’s be realistic. You don’t have learn or retrain your brain to understand
Fira Code. Symbols are all the same, they just look better.

~~~
lttlrck
The difference between e.g. -> and --> is a length of a small solid line. To
me that's equates to a huge drop in readability, countering the easy to brain-
parse argument.

~~~
tonsky
Agree, but no language uses both -> and -->

------
RubyPinch
that looks amazing, but I kinda wish that certain ligatures were optional
(which they might be, need to look at the CSS docs again for atom)

I (personally) don't exactly want == to look too similar to a single =, after
all!

~~~
leonatan
They don't. The == variant is has double the width.

~~~
RubyPinch
I am aware, I still find them too similar for my likings

~~~
tonsky
Have you tried the font? = and == has 3× difference in width, it’s hard to
mistake one for another. I’m using Fira Code for a year now, never had mixed
them up

------
anentropic
"Your eye spends non-zero amount of energy to scan, parse and join multiple
characters into a single logical one."

citation needed

~~~
ryanobjc
The brain is very good at turning complicated features in to abstract
concepts. In fact that is mostly what some parts do. So, not clear if this
actually improves things or not.

For example, the == and === look quite a bit similar in the font. You have to
compare relative sizes, whereas with the normal fonts you can count the
spaces.

The rest of the ligatures look pretty cool!

~~~
tonsky
You probably mean = and ==. They have 3× difference in width, which, in
practice (I’m using Fira Code for a year now), is more than enough to tell the
difference.

Regarding the difference between == and ===, latter has three lines (and so
does !==), so in fact in Fira Code === and !== the looks implies the meaning,
whether in other cases you have to bend your mind to accept that negation of
“three equals” is a “two equals and a bang”

------
z1mm32m4n
I'm not sure why this has to be done in the font. Vim has support for conceal
characters, which can "conceal" syntactic constructs into other characters,
i.e., any Unicode code point. This works out pretty well in LaTeX documents
for example, because you can see the mathematical symbols. [1]

One gripe I have though is that columns become misaligned when you have
concealed characters or ligatures. In the source, \alpha is 6 columns and
\beta is 5. Displayed, α and β are both 1 column. This messes up things like
visual block insert mode, because the location of that column in the source
and what's being displayed might differ. Should you line up the displayed
version and make it look nice for you and those with the same plugin, or don't
you?

[1]: [https://github.com/vim-pandoc/vim-pandoc](https://github.com/vim-
pandoc/vim-pandoc)

------
vdaniuk
I have been using Fira Code font with Atom for some time and I am absolutely
in love with the aesthetics. All credit and praise goes to
[http://tonsky.me/](http://tonsky.me/)

~~~
tonsky
️

------
aw3c2
= vs == vs === seems like a sure way to have bugs.

~~~
donatj
My thoughts exactly. Probably depends on the person but I am certainly the
type who would have trouble detecting the difference.

~~~
tonsky
Just give it a try. There’s 3× difference in width, so _in practice_ you won’t
mistake them, ever. I’m using that font for a year now, not a single case of
misreading

------
melted
After so many years, there's still no better coding font than MS Consolas. I
use it everywhere (where by "everywhere" I mean Linux and OSX, since I don't
use any MS products other than this font).

~~~
malnourish
Do you not like Inconsolata?

[https://www.google.com/fonts/specimen/Inconsolata](https://www.google.com/fonts/specimen/Inconsolata)

~~~
melted
When it comes to my eyesight, why settle for anything but the best? Consolas
is free as in beer to use. I just checked it into my dotfiles which I clone to
all my machines.

~~~
tonsky
I would rather put it “free as in torrents”. Microsoft
[https://www.microsoft.com/typography/fonts/family.aspx?FID=3...](https://www.microsoft.com/typography/fonts/family.aspx?FID=300)
offers to buy it for €129

~~~
melted
Maybe that's what it is now, but there was a window of time when Microsoft
offered it as a free download off MSDN to anyone who wants it. That's when I
got my copy.

------
codezero
This is really cool, but I must be getting old, because I find it particularly
difficult to parse.

------
tanyared
My vision is not 100% and when I code for a few hours my eyes get tired and it
gets even worse. Fira Code helps! Thank you, tonsky <3

~~~
tonsky
So happy to hear that!

------
gravypod
I feel that if you hide the text you need to type to insert a symbol, learning
a new language might be hard.

For instance, some languages use != and others use ~=. If both of those look
the same, you're going to have one hell of a time learning a language.

------
Luc
I'm trying out Atom, and ligatures in Erlang don't always render. For example,
-> in the head of a function clause doesn't render as a ligature, while inside
the function body it does.

EDIT: In developer mode I can see the -> is being rendered as two single
character <span>s when in the head of the function. The solution is probably
to fix it in the grammar definition: [https://github.com/jonathanmarvens/atom-
language-erlang/blob...](https://github.com/jonathanmarvens/atom-language-
erlang/blob/master/grammars/erlang.cson)

~~~
melloclello
I found the same thing, in Ruby -> was split up, while in Swift it was fine.

------
golergka
So, neither Emacs, nor vim (and none of it's gui variations) are supported.

~~~
melloclello
I'm finding it works fine in OS X's Terminal.app and (by extension) emacs and
vim (El Capitan 10.11).

~~~
golergka
Good news.

What about standalone (not terminal-based) Emacs on OSX?

~~~
tonsky
You can try this [https://github.com/tonsky/FiraCode/wiki/Setting-up-
Emacs](https://github.com/tonsky/FiraCode/wiki/Setting-up-Emacs)

------
jibsen
I tried using ligatured when Pragmata added them, but the issues made me
return to the normal version.

If you use your editor for multiple languages and documentation as well, you
may find things like lines in comment blocks made of '%', '#', or '-' to break
from the ligatures. Also if your doc markup(-down) uses underlines of '-' or
'=' for headings, they are affected.

On Windows, I found some editors where the ligatures were enabled, some where
they weren't, and not many where you had any option to toggle either way.

------
yawaramin
Really cool, but what, if any, are the plans to get it working with Vim? It's
the universal editor you're likely to find everywhere.

~~~
wffurr
Vim isn't there problem, it's your terminal. There is an open feature request
with iterm2, but terminal.app is probably a lost cause. I know nothing about
the state of Unicode font rendering in Linux.

~~~
baghira
It works fine under konsole 15.08.

~~~
gh02t
Konsole is the only terminal emulator I could get it working with, which is
annoying because I much prefer rxvt. Konsole does weird stuff with my terminal
colors in tmux, so I ended up not being able to use this nice font when I
tried it previously.

~~~
endgame
Have you tried urxvt, by any chance?

~~~
Tiksi
Tried to get it at least readable for 15 mins or so and gave up:
[http://paste.click/msFBVy](http://paste.click/msFBVy)

Tried all kinds of variations of

    
    
        > fnt="xft:Fira code:pixelsize=10:size=15"; urxvt -fn "$fnt" -fb "$fnt" -fi "$fnt" -fbi "$fnt" -letsp -1
    

Can't get the font spacing to not be massive and the ligatures don't work.

My build is:

    
    
        rxvt-unicode (urxvt) v9.21 - released: 2014-12-31
        options: perl,xft,styles,combining,blink,iso14755,unicode3,encodings=eu+vn+jp+jp-ext+kr+zh+zh-ext,fade,transparent,tint,pixbuf,XIM,frills,selectionscrolling,wheel,slipwheel,smart-resize,cursorBlink,pointerBlank,scrollbars=plain+rxvt+NeXT+xterm
    
    

Edit: Tried hasklig that was mentioned. Ligatures still don't work but the
spacing is fine: [http://paste.click/cEWQZs](http://paste.click/cEWQZs)

------
epmatsw
I love the ligatures (arrows and fat arrows in particular), but the @ sign is
so jarringly strange. It distracts me every time

------
legulere
Probably not possible with ligatures/glyph variants but really cool would be
grouping of numbers: In groups of three the first digit would be moved to the
right and the last one to the left to simulate a narrow space as thousands
separator.

~~~
duskwuff
I suspect that it's possible, but would require an impractical number (1000)
of ligatures in the font.

~~~
samwillis
I wander if it would correctly draw:

    
    
      1 000 000
    

and not do:

    
    
      100 000 0
    

assuming its parsed left to right?

------
wila
Probably a silly question, but can't we just generate ttf files from this so
that you can use it in any windows editor?

~~~
tonsky
Are there any problems with installing otf on windows? I installed and used
them just fine

~~~
wila
See I knew it was a silly question :) A few minutes ago I converted the otf
files to ttf using font forge. That appeared to work, but it seems the
ligatures are gone. On top of that the ttf version of the font did not show up
as a monospaced font in my code editor. I might have done something wrong
though as I only dabble a bit with font forge.

Then I just did what you suggested, install the otf instead (d'oh) Now the
fonts do show up as monospaced font. But my editor does not display the
ligatures. But at least it is usable.

~~~
tonsky
What editor do you use? Is it listed as supported here?
[https://github.com/tonsky/FiraCode#editor-
support](https://github.com/tonsky/FiraCode#editor-support)

~~~
wila
No, it is an editor called "the hammer" [1]. As it is I am one of the
developers of that editor. It is rather specialized and targets the
programming language DataFlex. The editing component is based on the codemax
component. While I have access to all the code, I'm not sure on how-to add
ligatures support.

[1] [http://vdf-guidance.com/The_Hammer.asp?Page=THEHAMMER](http://vdf-
guidance.com/The_Hammer.asp?Page=THEHAMMER)

------
chrissnell
What software is typically used to create a font like this? Are there any good
open source options?

~~~
tonsky
Glyphs.app provided a free license for Fira Code since font is open-source.
I’m using it because original Fira Mono is developed in it as well.

Monoid uses FontForge (free)

------
pekk
On what planet does it make sense to release a programming font which
explicitly refuses to support both vim and emacs?

~~~
laumars
Vim and emacs are terminal applications, thus it's down to the terminal
emulator to support the font. Some terminal emulators do (eg Konsole). However
many do not.

Frankly, I'm amazed at the number of programmers who have made the complaint
about vim and emacs support since writing terminal applications (ie stuff that
prints to STDOUT) is basically programming 101. It should be pretty obvious to
any programmer where the support is required.

~~~
throwaway999888
Emacs is a graphical application to me. That's the default behaviour, how I
use it, and what I see people doing things like screencasts use.

~~~
laumars
That's not emacs then, it's a Cocoa / Win32 / whatever port of emacs. Unless
your talking about "graphical" in the same sense that ncurses is. But either
way, emacs default behaviour is a terminal application.

~~~
throwaway999888
GNU Emacs 24.3.1

Copyright (C) 2013 Free Software Foundation, Inc.

`emacs` launches a graphical window.

Any objections?

~~~
laumars
I just installed GNU Emacs on my PC and it seems you're right. I swear that
never used to be the case; or maybe I've only ever used emacs on headless
servers so it defaulted to the terminal renderer? Weird - but sorry for
arguing with you on that point.

~~~
throwaway999888
:-) I guess even ancient 80s (?) software keeps with the _times_ to some
degree. Notwithstanding all the idiosyncratic (in our environment) defaults
for ergonomics and terminology..

