Skip to content

Commit

Permalink
Fira Code v3
Browse files Browse the repository at this point in the history
  • Loading branch information
tonsky committed Apr 9, 2020
1 parent 1d7e14a commit 947ced5
Show file tree
Hide file tree
Showing 65 changed files with 253 additions and 160 deletions.
228 changes: 114 additions & 114 deletions FiraCode.glyphs

Large diffs are not rendered by default.

91 changes: 56 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,84 @@
## Fira Code: monospaced font with programming ligatures
## Fira Code: free monospaced font with programming ligatures

<img src="./showcases/fira_code_logo.svg">
<img src="./extras/logo.svg">

### Problem

Programmers use a lot of symbols, often encoded with several characters. For the human brain, sequences like `->`, `<=` or `:=` are single logical tokens, even if they take two or three characters on the screen. Your eye spends a non-zero amount of energy to scan, parse and join multiple characters into a single logical one. Ideally, all programming languages should be designed with full-fledged Unicode symbols for operators, but that’s not the case yet.

### Solution

#### [Download v.2](https://github.com/tonsky/FiraCode/releases/download/2/FiraCode_2.zip) · [How to install](https://github.com/tonsky/FiraCode/wiki) · [Troubleshooting](https://github.com/tonsky/FiraCode/wiki#troubleshooting) · [News & updates](https://twitter.com/FiraCode)
Fira Code is a free monospaced font containing ligatures for common programming multi-character combinations. This is just a font rendering feature: underlying code remains ASCII-compatible. This helps to read and understand code faster. For some frequent sequences like `..` or `//`, ligatures allow us to correct spacing.

<a href="https://patreon.com/tonsky" target="_blank"><img src="./fira_code_patreon.png"></a>
### Download & Install

Fira Code is an extension of the Fira Mono font containing a set of ligatures for common programming multi-character combinations. This is just a font rendering feature: underlying code remains ASCII-compatible. This helps to read and understand code faster. For some frequent sequences like `..` or `//`, ligatures allow us to correct spacing.
**<a href="https://github.com/tonsky/FiraCode/releases/download/3/FiraCode_3.zip">Download Fira Code v3</a>**

<img src="./showcases/all_ligatures.png">
Then:

- <a href="https://github.com/tonsky/FiraCode/wiki">How to Install</a>
- <a href="https://github.com/tonsky/FiraCode/wiki#troubleshooting">Troubleshooting</a>
- <a href="https://twitter.com/FiraCode">News & Updates</a>

### Support

<a href="https://github.com/sponsors/tonsky" target="_blank"><img src="./extras/sponsor.png"></a>

Fira Code is a personal, free-time project with no funding and huge [feature request backlog](https://github.com/tonsky/FiraCode/issues). If you love it, consider supporting its development via [GitHub Sponsors](https://github.com/sponsors/tonsky) or [Patreon](https://patreon.com/tonsky). Any help counts!

### What’s in the box?

Left: ligatures as rendered in Fira Code. Right: same character sequences without ligatures.

<img src="./showcases/v3/all_ligatures.png">

Fira Code comes with a few different character variants, so that everyone can choose what’s best for them. [How to enable](https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets)

<img src="./showcases/v3/stylistic_sets.png">

In addition to that, Fira Code contains huge variety of Unicode characters well-suited for technical writing, math formulas and terminal UIs.

<img src="./showcases/v3/unicode.png">

### Code examples

Ruby:

<img src="./showcases/ruby.png">
<img src="./showcases/v3/ruby.png">

JavaScript:

<img src="./showcases/javascript.png">
<img src="./showcases/v3/javascript.png">

PHP:

<img src="./showcases/php.png">
<img src="./showcases/v3/php.png">

Erlang:

<img src="./showcases/erlang.png">
<img src="./showcases/v3/erlang.png">

Elixir:

<img src="/showcases/elixir.png">
<img src="/showcases/v3/elixir.png">

Go:

<img src="./showcases/go.png">
<img src="./showcases/v3/go.png">

LiveScript:

<img src="./showcases/livescript.png">
<img src="./showcases/v3/livescript.png">

Clojure:

<img src="./showcases/clojure.png">
<img src="./showcases/v3/clojure.png">

Swift:

<img src="./showcases/swift.png">

### Stylistic sets

See [How to enable](https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets)

<img src="./showcases/stylistic_sets.png">
<img src="./showcases/v3/swift.png">


### Terminal support
### Terminal compatibility list

| Works | Doesn’t work |
| ------------------ | ------------------ |
Expand All @@ -80,7 +97,7 @@ See [How to enable](https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylis
| **Windows Terminal** |
| **ZOC** (macOS) |

### Editor support
### Editor compatibility list

| Works | Doesn’t work |
| ----- | -------------- |
Expand Down Expand Up @@ -184,17 +201,21 @@ code { font-family: 'Fira Code', monospace; }

### Alternatives

Other monospaced fonts with ligatures:

- [Hasklig](https://github.com/i-tu/Hasklig) (free)
- [PragmataPro](http://www.fsd.it/fonts/pragmatapro.htm) (€59)
- [Monoid](http://larsenwork.com/monoid/) (free)
- [Fixedsys Excelsior](https://github.com/kika/fixedsys) (free)
- [Iosevka](https://be5invis.github.io/Iosevka/) (free)
- [DejaVu Sans Code](https://github.com/SSNikolaevich/DejaVuSansCode) (free)
- [Victor Mono](https://rubjo.github.io/victor-mono/) (free)
- [Cascadia Code](https://github.com/microsoft/cascadia-code) (free)
- [JetBrains Mono](https://github.com/JetBrains/JetBrainsMono) (free)
Other free monospaced fonts with ligatures:

- [Hasklig](https://github.com/i-tu/Hasklig)
- [Monoid](http://larsenwork.com/monoid/)
- [Fixedsys Excelsior](https://github.com/kika/fixedsys)
- [Iosevka](https://be5invis.github.io/Iosevka/)
- [DejaVu Sans Code](https://github.com/SSNikolaevich/DejaVuSansCode)
- [Victor Mono](https://rubjo.github.io/victor-mono/)
- [Cascadia Code](https://github.com/microsoft/cascadia-code)
- [JetBrains Mono](https://github.com/JetBrains/JetBrainsMono)

Paid monospaced fonts with ligatures:

- [PragmataPro](http://www.fsd.it/fonts/pragmatapro.htm)
- [Mono Lisa](https://monolisa.dev/)

### Building Fira Code locally

Expand Down
Binary file modified distr/otf/FiraCode-Bold.otf
Binary file not shown.
Binary file modified distr/otf/FiraCode-Light.otf
Binary file not shown.
Binary file modified distr/otf/FiraCode-Medium.otf
Binary file not shown.
Binary file modified distr/otf/FiraCode-Regular.otf
Binary file not shown.
Binary file modified distr/otf/FiraCode-Retina.otf
Binary file not shown.
Binary file added distr/otf/FiraCode-SemiBold.otf
Binary file not shown.
2 changes: 1 addition & 1 deletion distr/specimen.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
last3 = reverse <i>>></i> take 3 <i>>></i> reverse</div>


<div class="code semibold"><b># Fira Code Medium</b>
<div class="code semibold"><b># Fira Code SemiBold</b>

take = (n, [x, <i>...</i>xs]:list) <i>--></i>
| n <i><=</i> 0 <i>=></i> []
Expand Down
Binary file modified distr/ttf/FiraCode-Bold.ttf
Binary file not shown.
Binary file modified distr/ttf/FiraCode-Light.ttf
Binary file not shown.
Binary file modified distr/ttf/FiraCode-Medium.ttf
Binary file not shown.
Binary file modified distr/ttf/FiraCode-Regular.ttf
Binary file not shown.
Binary file modified distr/ttf/FiraCode-Retina.ttf
Binary file not shown.
Binary file modified distr/ttf/FiraCode-SemiBold.ttf
Binary file not shown.
Binary file modified distr/variable_ttf/FiraCode-VF.ttf
Binary file not shown.
Binary file added distr/variable_ttf/FiraCodeGX.ttf
Binary file not shown.
Binary file modified distr/woff/FiraCode-Bold.woff
Binary file not shown.
Binary file modified distr/woff/FiraCode-Light.woff
Binary file not shown.
Binary file modified distr/woff/FiraCode-Medium.woff
Binary file not shown.
Binary file modified distr/woff/FiraCode-Regular.woff
Binary file not shown.
Binary file removed distr/woff/FiraCode-Retina.woff
Binary file not shown.
Binary file added distr/woff/FiraCode-SemiBold.woff
Binary file not shown.
Binary file modified distr/woff/FiraCode-VF.woff
Binary file not shown.
Binary file modified distr/woff2/FiraCode-Bold.woff2
Binary file not shown.
Binary file modified distr/woff2/FiraCode-Light.woff2
Binary file not shown.
Binary file modified distr/woff2/FiraCode-Medium.woff2
Binary file not shown.
Binary file modified distr/woff2/FiraCode-Regular.woff2
Binary file not shown.
Binary file removed distr/woff2/FiraCode-Retina.woff2
Binary file not shown.
Binary file added distr/woff2/FiraCode-SemiBold.woff2
Binary file not shown.
Binary file modified distr/woff2/FiraCode-VF.woff2
Binary file not shown.
File renamed without changes
Binary file added extras/sponsor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added extras/texture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed fira_code_patreon.png
Binary file not shown.
26 changes: 26 additions & 0 deletions script/build_variable
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash -e

rm -rf distr/variable_ttf
fontmake -g FiraCode.glyphs -o variable --output-dir distr/variable_ttf

# -------------------------------------------------------------
# fix variable font metadata as needed ------------------------

firaCodeVF=distr/variable_ttf/FiraCode-VF.ttf

# fix variable font metadata – very important
gftools fix-vf-meta $firaCodeVF

# other fixes for metadata and hinting
gftools fix-nonhinting $firaCodeVF $firaCodeVF
gftools fix-gasp --autofix $firaCodeVF
gftools fix-dsig --autofix $firaCodeVF

# cleanup of temp files
tempFiles=$(ls distr/variable_ttf/*.fix && ls distr/variable_ttf/*-gasp*)
for temp in $tempFiles
do
rm -rf $temp
done

# TODO (late 2019?): use TTFautohint-VF for variable font (current support is minimal)
15 changes: 15 additions & 0 deletions script/build_woff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -e
# requires sfnt2woff-zopfli (get from https://github.com/bramstein/homebrew-webfonttools)

rm -rf distr/woff

ttfs=$(ls distr/*/*.ttf)
for ttf in $ttfs; do
sfnt2woff-zopfli $ttf
done

mkdir -p distr/woff
woffs=$(ls distr/*/*.woff)
for woff in $woffs; do
mv $woff distr/woff/$(basename $woff)
done
15 changes: 15 additions & 0 deletions script/build_woff2
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -e
# requires woff2_compress (get from https://github.com/bramstein/homebrew-webfonttools)

rm -rf distr/woff2

ttfs=$(ls distr/*/*.ttf)
for ttf in $ttfs; do
woff2_compress $ttf
done

mkdir -p distr/woff2
woff2s=$(ls distr/*/*.woff2)
for woff2 in $woff2s; do
mv $woff2 distr/woff2/$(basename $woff2)
done
Binary file removed showcases/Fira Code Showcases.sketch
Binary file not shown.
Binary file removed showcases/all_ligatures.png
Binary file not shown.
Binary file removed showcases/clojure.png
Binary file not shown.
Binary file removed showcases/elixir.png
Binary file not shown.
Binary file removed showcases/erlang.png
Binary file not shown.
Binary file removed showcases/fira code logo.sketch
Binary file not shown.
Binary file removed showcases/go.png
Binary file not shown.
Binary file removed showcases/javascript.png
Binary file not shown.
Binary file removed showcases/livescript.png
Binary file not shown.
Binary file removed showcases/php.png
Binary file not shown.
Binary file removed showcases/ruby.png
Binary file not shown.
Binary file removed showcases/stylistic_sets.png
Binary file not shown.
Binary file removed showcases/swift.png
Binary file not shown.
Binary file added showcases/v3/all_ligatures.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added showcases/v3/clojure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added showcases/v3/elixir.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added showcases/v3/erlang.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added showcases/v3/go.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added showcases/v3/javascript.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added showcases/v3/livescript.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added showcases/v3/php.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added showcases/v3/ruby.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 26 additions & 10 deletions showcases/showcases.txt → showcases/v3/showcases.txt
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
.= .- := ::= =:= __
.= .- ..= := ::= =:= __
== != === !== =/= =!=

<-< <<- <-- <- <-> -> --> ->> >->
<=< <<= <== <=> => ==> =>> >=>
<=< <<= <== <<->> <=> => ==> =>> >=>
>>= >>- >- <~> -< -<< =<<
<-| <=| /\ \/ |-> |=>
<~~ <~ ~~ ~> ~~>

<<< << <= <> >= >> >>>
{. {| [| <: :> |] |} .}
<<< << <= <> >= >> >>>
{. {| [| <: :> |] |} .}
<||| <|| <| <|> |> ||> |||>

<$ <$> $>
<+ <+> +>
<* <*> *>

\ \\ /* */ /// //
\n \\ /* */ /// //
</ <!-- </> --> />
0xF www fl Fl Tl
0xF www Fl Tl Il fi fj

;; :: ::: !! ?? %% &&
|| .. ... ..< .? ?. ?:
|| .. ... ..< .? ?.
-- --- ++ +++ ** ***

~= ~- -~ ~@
=~ !~ ~- -~ ~@
^= ?= /= /==
-| _|_ |- ||- |= ||=
#! #= ## ### ####
Expand All @@ -37,12 +37,22 @@ a-b a-A B-b A-B -a -A a- A-
a+b a+A B+b A+B +a +A a+ A+
a:b a:A B:b A:B :a :A a: A:

# Powerline

      

# Stylistic sets

r 0 123456789 & && $ <$ <$> $> @ <= >=

# Unicode

≢ ẞ ᐅ ᐊ ∴ ∵ ⎈ ‖ ∧ ∨ ⊢ ⊣ ⊤ ⊥ ⊦ ⊧ ⊨ ⊩ ⊪ ⊫ ⊬ ⊭ ⊮ ⊯
⟲⟳ ⟰ ⟱ ⟴ ⟵ ⟶ ⟷ ⟸ ⟹ ⟺ ⟻ ⟼ ⟽ ⟾ ⟿
↩ ⇞ ⇟ ⇤ ⇥ ⌀ ⌃ ⌄ ⌅ ⌆ ⌘ ⌤ ⌥ ⎇ ⎋ ⏏ ☐ ☑ ☒
↩ ⇞ ⇟ ⇤ ⇥ ⌀ ⌃ ⌄ ⌅ ⌆ ⌘ ⌤ ⌥ ⎇ ⎋ ⏏ ☐ ☑ ☒ ▤ ▦ ▧ ▨ ▩
␆ ␈ ␇ ␣ ␢ ␘ ␍ ␐ ␡ ␥ ␔ ␑ ␓ ␒ ␙ ␃ ␄ ␗ ␅ ␛ ␜ ␌ ␝ ␉ ␊ ␕ ␤ ␀ ␞ ␏ ␎ ␠ ␁ ␂ ␚ ␦ ␖ ␟ ␋
ℂ ℍ ℕ ℙ ℚ ℝ ℤ 𝔹 ∀ ∃ ∄ ∅ ⊂ ⊃ ⊄ ⊅ ⊆ ⊇ ⊈ ⊉ ⊊ ⊋ ∈ ∉ ∊ ∋ ∌ ∍ ∪ ∩
☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷ 「a」 「a」

# Box drawing

Expand All @@ -51,9 +61,15 @@ a:b a:A B:b A:B :a :A a: A:
╎ ╏ ┆ ┇ ┊ ┋
╰╍╍╍╍╯ ╰┅┅┅┅╯ ╰┉┉┉┉╯

┌─┬─┐ ╔╦═╗ ┏━┳┓ ╒═╤═╗ ╭─┰─╮
├─┼─┤ ╠╬═╣ ┣━╋┫ ├─┼─╢ ┝━╋━┥
└─┴─┘ ╚╩═╝ ┗━┻┛ ╘═╧═╝ ╰─┸─╯

# Blocks

|███ | 50%
|███ | 50%

▖ ▗ ▙ ▚ ▛ ▜ ▞ ▟

▁▂▃▄▅▆▇█▀▔
Expand Down
Binary file added showcases/v3/stylistic_sets.png
Binary file added showcases/v3/swift.png
Binary file added showcases/v3/unicode.png

0 comments on commit 947ced5

Please sign in to comment.