add fonts

+563
fonts/Fira_Code_v6/README.txt
··· 1 + Installing 2 + ========== 3 + 4 + Windows 5 + ------- 6 + 7 + In the ttf folder, double-click each font file, click “Install font”; to install all at once, select all files, right-click, and choose “Install” 8 + 9 + OR 10 + 11 + Use https://chocolatey.org: 12 + 13 + choco install firacode 14 + 15 + 16 + macOS 17 + ----- 18 + 19 + In the downloaded TTF folder: 20 + 21 + 1. Select all font files 22 + 2. Right click and select `Open` (alternatively `Open With Font Book`) 23 + 3. Select "Install Font" 24 + 25 + OR 26 + 27 + Use http://brew.sh: 28 + 29 + `brew tap homebrew/cask-fonts` 30 + `brew install font-fira-code` 31 + 32 + 33 + Ubuntu Zesty (17.04), Debian Stretch (9) or newer 34 + ------------------------------------------------- 35 + 36 + 1. Make sure that the `universe` (for Ubuntu) or `contrib` (for Debian) repository is enabled (see https://askubuntu.com/questions/148638/how-do-i-enable-the-universe-repository or https://wiki.debian.org/SourcesList#Component) 37 + 2. Install `fonts-firacode` package either by executing `sudo apt install fonts-firacode` in the terminal or via GUI tool (like “Software Center”) 38 + 39 + 40 + Arch Linux 41 + ---------- 42 + 43 + Fira Code package is available in the official repository: https://www.archlinux.org/packages/community/any/ttf-fira-code/. 44 + 45 + Variant of Fira Code package is available in the AUR: https://aur.archlinux.org/packages/otf-fira-code-git/. 46 + 47 + 48 + Gentoo 49 + ------ 50 + 51 + emerge -av media-fonts/fira-code 52 + 53 + 54 + Fedora 55 + ------ 56 + 57 + To install, perform the following commands: 58 + 59 + dnf install fira-code-fonts 60 + 61 + 62 + Solus 63 + ----- 64 + 65 + Fira Code package is available in the official repository: `font-firacode-ttf` and `font-firacode-otf`. 66 + They can be installed by running: 67 + 68 + sudo eopkg install font-firacode-ttf font-firacode-otf 69 + 70 + 71 + Void linux 72 + ---------- 73 + 74 + xbps-install font-firacode 75 + 76 + 77 + Linux Manual Installation 78 + ------------------------- 79 + 80 + With most desktop-oriented distributions, double-clicking each font file in the ttf folder and selecting “Install font” should be enough. If it isn’t, create and run `download_and_install.sh` script: 81 + 82 + #!/usr/bin/env bash 83 + 84 + fonts_dir="${HOME}/.local/share/fonts" 85 + if [ ! -d "${fonts_dir}" ]; then 86 + echo "mkdir -p $fonts_dir" 87 + mkdir -p "${fonts_dir}" 88 + else 89 + echo "Found fonts dir $fonts_dir" 90 + fi 91 + 92 + for type in Bold Light Medium Regular Retina; do 93 + file_path="${HOME}/.local/share/fonts/FiraCode-${type}.ttf" 94 + file_url="https://github.com/tonsky/FiraCode/blob/master/distr/ttf/FiraCode-${type}.ttf?raw=true" 95 + if [ ! -e "${file_path}" ]; then 96 + echo "wget -O $file_path $file_url" 97 + wget -O "${file_path}" "${file_url}" 98 + else 99 + echo "Found existing file $file_path" 100 + fi; 101 + done 102 + 103 + echo "fc-cache -f" 104 + fc-cache -f 105 + 106 + More details: https://github.com/tonsky/FiraCode/issues/4 107 + 108 + 109 + FreeBSD 110 + ------- 111 + 112 + Using pkg(8): 113 + 114 + pkg install firacode 115 + 116 + OR 117 + 118 + Using ports: 119 + 120 + cd /usr/ports/x11-fonts/firacode && make install clean 121 + 122 + 123 + Enabling ligatures 124 + ================== 125 + 126 + Atom 127 + ---- 128 + 129 + To change your font to Fira Code, open Atom's preferences (`cmd + ,` on a Mac, `ctrl + ,` on PC), make sure the "Settings" tab is selected, or the "Editor" in Atom 1.10+, and scroll down to "Editor Settings". In the "Font Family" field, enter `Fira Code`. 130 + 131 + If you wish to specify a font weight, for example, Light, use `Fira Code Light` as a font name (Windows) or `FiraCode-Light` (macOS). 132 + 133 + Ligatures are enabled by default in Atom 1.9 and above. 134 + 135 + 136 + VS Code 137 + ------- 138 + 139 + To open the settings editor, first from the File menu choose Preferences, Settings or use keyboard shortcut `Ctrl + ,` (Windows) or `Cmd + ,` (macOS). 140 + 141 + To enable FiraCode in the settings editor, under "Commonly Used", expand the "Text Editor" settings and then click on "Font". In the "Font Family" input box type `Fira Code`, replacing any content. Tick the check box "Enables/Disables font ligatures" under "Font Ligatures" to enable the special ligatures. 142 + 143 + If you wish to specify a font weight, for example, Light, use `Fira Code Light` as a font name (Windows) or `FiraCode-Light` (macOS). 144 + 145 + 146 + IntelliJ products 147 + ----------------- 148 + 149 + 1. Enable in Settings → Editor → Font → Enable Font Ligatures 150 + 2. Select `Fira Code` as "Primary font" under Settings → Editor → Font 151 + 152 + Additionally, if a Color Scheme is selected: 153 + 154 + 3. Enable in Settings → Editor → Color Scheme → Color Scheme Font → Enable Font Ligatures 155 + 4. Select Fira Code as "Primary font" under Settings → Editor → Color Scheme → Color Scheme Font 156 + 157 + 158 + BBEdit, TextWrangler 159 + -------------------- 160 + 161 + Run in your terminal: 162 + 163 + defaults write com.barebones.bbedit "EnableFontLigatures_Fira Code" -bool YES 164 + 165 + Source: https://www.barebones.com/support/bbedit/ExpertPreferences.html 166 + 167 + 168 + Brackets 169 + -------- 170 + 171 + 1. From the `View` menu choose `Themes....` 172 + 2. Paste `'Fira Code'`, at the beginning of `Font Family` 173 + 174 + 175 + Emacs 176 + ----- 177 + 178 + There are a few options when it comes down to using ligatures in 179 + Emacs. They are listed in order of preferred to less-preferred. Pick one! 180 + 181 + 1. Using composition mode in Emacs Mac port 182 + 183 + If you're using the latest Mac port of Emacs (https://bitbucket.org/mituharu/emacs-mac by Mitsuharu Yamamoto) for macOS, you can use: 184 + 185 + (mac-auto-operator-composition-mode) 186 + 187 + This is generally the easiest solution, but can only be used on macOS. 188 + 189 + 2. Using prettify-symbols 190 + 191 + These instructions are pieced together by https://github.com/Triavanicus, taking some pieces from https://github.com/minad/hasklig-mode. 192 + 193 + This method requires you to install the Fira Code Symbol font, made by https://github.com/siegebell: 194 + https://github.com/tonsky/FiraCode/issues/211#issuecomment-239058632 195 + 196 + (defun fira-code-mode--make-alist (list) 197 + "Generate prettify-symbols alist from LIST." 198 + (let ((idx -1)) 199 + (mapcar 200 + (lambda (s) 201 + (setq idx (1+ idx)) 202 + (let* ((code (+ #Xe100 idx)) 203 + (width (string-width s)) 204 + (prefix ()) 205 + (suffix '(?\s (Br . Br))) 206 + (n 1)) 207 + (while (< n width) 208 + (setq prefix (append prefix '(?\s (Br . Bl)))) 209 + (setq n (1+ n))) 210 + (cons s (append prefix suffix (list (decode-char 'ucs code)))))) 211 + list))) 212 + 213 + (defconst fira-code-mode--ligatures 214 + '("www" "**" "***" "**/" "*>" "*/" "\\\\" "\\\\\\" 215 + "{-" "[]" "::" ":::" ":=" "!!" "!=" "!==" "-}" 216 + "--" "---" "-->" "->" "->>" "-<" "-<<" "-~" 217 + "#{" "#[" "##" "###" "####" "#(" "#?" "#_" "#_(" 218 + ".-" ".=" ".." "..<" "..." "?=" "??" ";;" "/*" 219 + "/**" "/=" "/==" "/>" "//" "///" "&&" "||" "||=" 220 + "|=" "|>" "^=" "$>" "++" "+++" "+>" "=:=" "==" 221 + "===" "==>" "=>" "=>>" "<=" "=<<" "=/=" ">-" ">=" 222 + ">=>" ">>" ">>-" ">>=" ">>>" "<*" "<*>" "<|" "<|>" 223 + "<$" "<$>" "<!--" "<-" "<--" "<->" "<+" "<+>" "<=" 224 + "<==" "<=>" "<=<" "<>" "<<" "<<-" "<<=" "<<<" "<~" 225 + "<~~" "</" "</>" "~@" "~-" "~=" "~>" "~~" "~~>" "%%" 226 + "x" ":" "+" "+" "*")) 227 + 228 + (defvar fira-code-mode--old-prettify-alist) 229 + 230 + (defun fira-code-mode--enable () 231 + "Enable Fira Code ligatures in current buffer." 232 + (setq-local fira-code-mode--old-prettify-alist prettify-symbols-alist) 233 + (setq-local prettify-symbols-alist (append (fira-code-mode--make-alist fira-code-mode--ligatures) fira-code-mode--old-prettify-alist)) 234 + (prettify-symbols-mode t)) 235 + 236 + (defun fira-code-mode--disable () 237 + "Disable Fira Code ligatures in current buffer." 238 + (setq-local prettify-symbols-alist fira-code-mode--old-prettify-alist) 239 + (prettify-symbols-mode -1)) 240 + 241 + (define-minor-mode fira-code-mode 242 + "Fira Code ligatures minor mode" 243 + :lighter " Fira Code" 244 + (setq-local prettify-symbols-unprettify-at-point 'right-edge) 245 + (if fira-code-mode 246 + (fira-code-mode--enable) 247 + (fira-code-mode--disable))) 248 + 249 + (defun fira-code-mode--setup () 250 + "Setup Fira Code Symbols" 251 + (set-fontset-font t '(#Xe100 . #Xe16f) "Fira Code Symbol")) 252 + 253 + (provide 'fira-code-mode) 254 + 255 + Alternative instructions: https://github.com/Profpatsch/blog/blob/master/posts/ligature-emulation-in-emacs/post.md#appendix-b-update-1-firacode-integration 256 + 257 + 3. Using composition char table 258 + 259 + Thanks to https://github.com/seanfarley for putting this together; extended by https://github.com/jrblevin. 260 + 261 + Put this lisp in your .emacs: 262 + 263 + (when (window-system) 264 + (set-frame-font "Fira Code")) 265 + (let ((alist '((33 . ".\\(?:\\(?:==\\|!!\\)\\|[!=]\\)") 266 + (35 . ".\\(?:###\\|##\\|_(\\|[#(?[_{]\\)") 267 + (36 . ".\\(?:>\\)") 268 + (37 . ".\\(?:\\(?:%%\\)\\|%\\)") 269 + (38 . ".\\(?:\\(?:&&\\)\\|&\\)") 270 + (42 . ".\\(?:\\(?:\\*\\*/\\)\\|\\(?:\\*[*/]\\)\\|[*/>]\\)") 271 + (43 . ".\\(?:\\(?:\\+\\+\\)\\|[+>]\\)") 272 + (45 . ".\\(?:\\(?:-[>-]\\|<<\\|>>\\)\\|[<>}~-]\\)") 273 + (46 . ".\\(?:\\(?:\\.[.<]\\)\\|[.=-]\\)") 274 + (47 . ".\\(?:\\(?:\\*\\*\\|//\\|==\\)\\|[*/=>]\\)") 275 + (48 . ".\\(?:x[a-zA-Z]\\)") 276 + (58 . ".\\(?:::\\|[:=]\\)") 277 + (59 . ".\\(?:;;\\|;\\)") 278 + (60 . ".\\(?:\\(?:!--\\)\\|\\(?:~~\\|->\\|\\$>\\|\\*>\\|\\+>\\|--\\|<[<=-]\\|=[<=>]\\||>\\)\\|[*$+~/<=>|-]\\)") 279 + (61 . ".\\(?:\\(?:/=\\|:=\\|<<\\|=[=>]\\|>>\\)\\|[<=>~]\\)") 280 + (62 . ".\\(?:\\(?:=>\\|>[=>-]\\)\\|[=>-]\\)") 281 + (63 . ".\\(?:\\(\\?\\?\\)\\|[:=?]\\)") 282 + (91 . ".\\(?:]\\)") 283 + (92 . ".\\(?:\\(?:\\\\\\\\\\)\\|\\\\\\)") 284 + (94 . ".\\(?:=\\)") 285 + (119 . ".\\(?:ww\\)") 286 + (123 . ".\\(?:-\\)") 287 + (124 . ".\\(?:\\(?:|[=|]\\)\\|[=>|]\\)") 288 + (126 . ".\\(?:~>\\|~~\\|[>=@~-]\\)") 289 + ) 290 + )) 291 + (dolist (char-regexp alist) 292 + (set-char-table-range composition-function-table (car char-regexp) 293 + `([,(cdr char-regexp) 0 font-shape-gstring])))) 294 + 295 + **Note!** If you get `error in process filter: Attempt to shape unibyte text`, check out https://github.com/tonsky/FiraCode/issues/42. Emacs Cider users may avoid this issue by commenting the following line from the above config: 296 + 297 + ;; (46 . ".\\(?:\\(?:\\.[.<]\\)\\|[.=-]\\)") 298 + 299 + Char `45` is also known to have issues in macOS Mojave. 300 + 301 + If you are having problems with helm you can disable ligatures in helm: 302 + 303 + (add-hook 'helm-major-mode-hook 304 + (lambda () 305 + (setq auto-composition-mode nil))) 306 + 307 + 4. Using font-lock keywords 308 + 309 + If none of the above worked, you can try this method. 310 + 311 + This method requires you to install the Fira Code Symbol font, made by https://github.com/siegebell: 312 + https://github.com/tonsky/FiraCode/issues/211#issuecomment-239058632 313 + 314 + ;;; Fira code 315 + ;; This works when using emacs --daemon + emacsclient 316 + (add-hook 'after-make-frame-functions (lambda (frame) (set-fontset-font t '(#Xe100 . #Xe16f) "Fira Code Symbol"))) 317 + ;; This works when using emacs without server/client 318 + (set-fontset-font t '(#Xe100 . #Xe16f) "Fira Code Symbol") 319 + ;; I haven't found one statement that makes both of the above situations work, so I use both for now 320 + 321 + (defconst fira-code-font-lock-keywords-alist 322 + (mapcar (lambda (regex-char-pair) 323 + `(,(car regex-char-pair) 324 + (0 (prog1 () 325 + (compose-region (match-beginning 1) 326 + (match-end 1) 327 + ;; The first argument to concat is a string containing a literal tab 328 + ,(concat " " (list (decode-char 'ucs (cadr regex-char-pair))))))))) 329 + '(("\\(www\\)" #Xe100) 330 + ("[^/]\\(\\*\\*\\)[^/]" #Xe101) 331 + ("\\(\\*\\*\\*\\)" #Xe102) 332 + ("\\(\\*\\*/\\)" #Xe103) 333 + ("\\(\\*>\\)" #Xe104) 334 + ("[^*]\\(\\*/\\)" #Xe105) 335 + ("\\(\\\\\\\\\\)" #Xe106) 336 + ("\\(\\\\\\\\\\\\\\)" #Xe107) 337 + ("\\({-\\)" #Xe108) 338 + ("\\(\\[\\]\\)" #Xe109) 339 + ("\\(::\\)" #Xe10a) 340 + ("\\(:::\\)" #Xe10b) 341 + ("[^=]\\(:=\\)" #Xe10c) 342 + ("\\(!!\\)" #Xe10d) 343 + ("\\(!=\\)" #Xe10e) 344 + ("\\(!==\\)" #Xe10f) 345 + ("\\(-}\\)" #Xe110) 346 + ("\\(--\\)" #Xe111) 347 + ("\\(---\\)" #Xe112) 348 + ("\\(-->\\)" #Xe113) 349 + ("[^-]\\(->\\)" #Xe114) 350 + ("\\(->>\\)" #Xe115) 351 + ("\\(-<\\)" #Xe116) 352 + ("\\(-<<\\)" #Xe117) 353 + ("\\(-~\\)" #Xe118) 354 + ("\\(#{\\)" #Xe119) 355 + ("\\(#\\[\\)" #Xe11a) 356 + ("\\(##\\)" #Xe11b) 357 + ("\\(###\\)" #Xe11c) 358 + ("\\(####\\)" #Xe11d) 359 + ("\\(#(\\)" #Xe11e) 360 + ("\\(#\\?\\)" #Xe11f) 361 + ("\\(#_\\)" #Xe120) 362 + ("\\(#_(\\)" #Xe121) 363 + ("\\(\\.-\\)" #Xe122) 364 + ("\\(\\.=\\)" #Xe123) 365 + ("\\(\\.\\.\\)" #Xe124) 366 + ("\\(\\.\\.<\\)" #Xe125) 367 + ("\\(\\.\\.\\.\\)" #Xe126) 368 + ("\\(\\?=\\)" #Xe127) 369 + ("\\(\\?\\?\\)" #Xe128) 370 + ("\\(;;\\)" #Xe129) 371 + ("\\(/\\*\\)" #Xe12a) 372 + ("\\(/\\*\\*\\)" #Xe12b) 373 + ("\\(/=\\)" #Xe12c) 374 + ("\\(/==\\)" #Xe12d) 375 + ("\\(/>\\)" #Xe12e) 376 + ("\\(//\\)" #Xe12f) 377 + ("\\(///\\)" #Xe130) 378 + ("\\(&&\\)" #Xe131) 379 + ("\\(||\\)" #Xe132) 380 + ("\\(||=\\)" #Xe133) 381 + ("[^|]\\(|=\\)" #Xe134) 382 + ("\\(|>\\)" #Xe135) 383 + ("\\(\\^=\\)" #Xe136) 384 + ("\\(\\$>\\)" #Xe137) 385 + ("\\(\\+\\+\\)" #Xe138) 386 + ("\\(\\+\\+\\+\\)" #Xe139) 387 + ("\\(\\+>\\)" #Xe13a) 388 + ("\\(=:=\\)" #Xe13b) 389 + ("[^!/]\\(==\\)[^>]" #Xe13c) 390 + ("\\(===\\)" #Xe13d) 391 + ("\\(==>\\)" #Xe13e) 392 + ("[^=]\\(=>\\)" #Xe13f) 393 + ("\\(=>>\\)" #Xe140) 394 + ("\\(<=\\)" #Xe141) 395 + ("\\(=<<\\)" #Xe142) 396 + ("\\(=/=\\)" #Xe143) 397 + ("\\(>-\\)" #Xe144) 398 + ("\\(>=\\)" #Xe145) 399 + ("\\(>=>\\)" #Xe146) 400 + ("[^-=]\\(>>\\)" #Xe147) 401 + ("\\(>>-\\)" #Xe148) 402 + ("\\(>>=\\)" #Xe149) 403 + ("\\(>>>\\)" #Xe14a) 404 + ("\\(<\\*\\)" #Xe14b) 405 + ("\\(<\\*>\\)" #Xe14c) 406 + ("\\(<|\\)" #Xe14d) 407 + ("\\(<|>\\)" #Xe14e) 408 + ("\\(<\\$\\)" #Xe14f) 409 + ("\\(<\\$>\\)" #Xe150) 410 + ("\\(<!--\\)" #Xe151) 411 + ("\\(<-\\)" #Xe152) 412 + ("\\(<--\\)" #Xe153) 413 + ("\\(<->\\)" #Xe154) 414 + ("\\(<\\+\\)" #Xe155) 415 + ("\\(<\\+>\\)" #Xe156) 416 + ("\\(<=\\)" #Xe157) 417 + ("\\(<==\\)" #Xe158) 418 + ("\\(<=>\\)" #Xe159) 419 + ("\\(<=<\\)" #Xe15a) 420 + ("\\(<>\\)" #Xe15b) 421 + ("[^-=]\\(<<\\)" #Xe15c) 422 + ("\\(<<-\\)" #Xe15d) 423 + ("\\(<<=\\)" #Xe15e) 424 + ("\\(<<<\\)" #Xe15f) 425 + ("\\(<~\\)" #Xe160) 426 + ("\\(<~~\\)" #Xe161) 427 + ("\\(</\\)" #Xe162) 428 + ("\\(</>\\)" #Xe163) 429 + ("\\(~@\\)" #Xe164) 430 + ("\\(~-\\)" #Xe165) 431 + ("\\(~=\\)" #Xe166) 432 + ("\\(~>\\)" #Xe167) 433 + ("[^<]\\(~~\\)" #Xe168) 434 + ("\\(~~>\\)" #Xe169) 435 + ("\\(%%\\)" #Xe16a) 436 + ("[0\[]\\(x\\)" #Xe16b) 437 + ("[^:=]\\(:\\)[^:=]" #Xe16c) 438 + ("[^\\+<>]\\(\\+\\)[^\\+<>]" #Xe16d) 439 + ("[^\\*/<>]\\(\\*\\)[^\\*/<>]" #Xe16f)))) 440 + 441 + (defun add-fira-code-symbol-keywords () 442 + (font-lock-add-keywords nil fira-code-font-lock-keywords-alist)) 443 + 444 + (add-hook 'prog-mode-hook 445 + #'add-fira-code-symbol-keywords) 446 + 447 + On some systems, `==` will appear incorrectly as a blank space in certain modes unless you add the following lines to your init file: 448 + 449 + (set-language-environment "UTF-8") 450 + (set-default-coding-systems 'utf-8) 451 + 452 + 453 + GoormIDE 454 + -------- 455 + 456 + In a workspace: 457 + 458 + 1. Click goormIDE, then Preferences. 459 + 2. Go to Theme, then focus Custom Theme CSS. 460 + 3. Copy & paste the following: 461 + 462 + @font-face{ 463 + font-family: 'Fira Code'; 464 + src: url('https://raw.githubusercontent.com/tonsky/FiraCode/master/distr/eot/FiraCode-Regular.eot') format('embedded-opentype'), 465 + url('https://raw.githubusercontent.com/tonsky/FiraCode/master/distr/woff2/FiraCode-Regular.woff2') format('woff2'), 466 + url('https://raw.githubusercontent.com/tonsky/FiraCode/master/distr/woff/FiraCode-Regular.woff') format('woff'), 467 + url('https://raw.githubusercontent.com/tonsky/FiraCode/master/distr/ttf/FiraCode-Regular.ttf') format('truetype'); 468 + font-weight: normal; 469 + font-style: normal; 470 + } 471 + 472 + .editor_container pre { 473 + -webkit-font-feature-settings: "liga" on, "calt" on; 474 + -webkit-font-smoothing: antialiased; 475 + text-rendering: optimizeLegibility; 476 + font-family: 'Fira Code'; 477 + } 478 + 479 + 4. Click Aplly or OK 480 + 5. Happy coding! 481 + 482 + 483 + Cloud9 484 + ------ 485 + 486 + In a workspace: 487 + 488 + 1. Click Cloud9, then Preferences (or use keyboard shortcut CTRL + ,) 489 + 2. Go to Themes, then click on You can also style Cloud9 by editing your stylesheet (this will open a blank styles.css file in the C9 editor) 490 + 3. Copy & paste the following: 491 + 492 + @font-face{ 493 + font-family: 'Fira Code'; 494 + src: url('https://raw.githubusercontent.com/tonsky/FiraCode/master/distr/eot/FiraCode-Regular.eot') format('embedded-opentype'), 495 + url('https://raw.githubusercontent.com/tonsky/FiraCode/master/distr/woff2/FiraCode-Regular.woff2') format('woff2'), 496 + url('https://raw.githubusercontent.com/tonsky/FiraCode/master/distr/woff/FiraCode-Regular.woff') format('woff'), 497 + url('https://raw.githubusercontent.com/tonsky/FiraCode/master/distr/ttf/FiraCode-Regular.ttf') format('truetype'); 498 + font-weight: normal; 499 + font-style: normal; 500 + } 501 + 502 + .ace_editor{ 503 + -webkit-font-feature-settings: "liga" on, "calt" on; 504 + -webkit-font-smoothing: antialiased; 505 + text-rendering: optimizeLegibility; 506 + font-family: 'Fira Code'; 507 + } 508 + 509 + 4. Back in Preferences tab, click on User Settings, then click on Code Editor (Ace) 510 + 5. In Font Family field, enter Fira Code 511 + 6. Optionally, repeat step 5 for Preferences > User Settings > Terminal, if you want Fira Code font in C9 terminal. 512 + 513 + 514 + MacVim 515 + ------ 516 + 517 + Add this to ~/.gvimrc: 518 + 519 + set macligatures 520 + set guifont=Fira\ Code:h12 521 + 522 + MacVim supports ligatures starting from version 7.4. 523 + 524 + 525 + RStudio 526 + ------- 527 + 528 + In RStudio: 529 + 530 + 1. Go to Tools > Global Options > Appearance 531 + 2. Select "Fira Code" as Editor Font. In older versions of RStudio, check "Use Ligatures". 532 + 3. Hit "OK" and enjoy 533 + 534 + 535 + Sublime Text 536 + ------------ 537 + 538 + Preferences --> Settings 539 + 540 + Add before "ignored_packages": 541 + 542 + "font_face": "Fira Code", 543 + "font_options": ["subpixel_antialias"], 544 + 545 + If you want enable antialias, add in font_options: "gray_antialias" 546 + 547 + 548 + Visual Studio 549 + ------------- 550 + 551 + 1. Launch Visual Studio (2015 or later). 552 + 2. Launch the Options dialog by opening the "Tools" menu and selecting "Options". 553 + 3. In the Options dialog, under the "Environment" category, you'll find "Fonts and Colors". Click on that. You'll see a combo-box on the right hand side of the dialog labelled "Font". Select "Fira Code" from that combo-box. 554 + 4. Click "OK" to dismiss. 555 + 5. Restart Visual Studio. 556 + 557 + Now, most FiraCode ligatures will work. A notable exception is the hyphen-based ligatures (e.g. the C++ dereference '->'). See https://github.com/tonsky/FiraCode/issues/422 for details. 558 + 559 + 560 + Troubleshooting 561 + =============== 562 + 563 + See https://github.com/tonsky/FiraCode/wiki/Troubleshooting
+48
fonts/Fira_Code_v6/fira_code.css
··· 1 + @font-face { 2 + font-family: 'Fira Code'; 3 + src: url('woff2/FiraCode-Light.woff2') format('woff2'), 4 + url("woff/FiraCode-Light.woff") format("woff"); 5 + font-weight: 300; 6 + font-style: normal; 7 + } 8 + 9 + @font-face { 10 + font-family: 'Fira Code'; 11 + src: url('woff2/FiraCode-Regular.woff2') format('woff2'), 12 + url("woff/FiraCode-Regular.woff") format("woff"); 13 + font-weight: 400; 14 + font-style: normal; 15 + } 16 + 17 + @font-face { 18 + font-family: 'Fira Code'; 19 + src: url('woff2/FiraCode-Medium.woff2') format('woff2'), 20 + url("woff/FiraCode-Medium.woff") format("woff"); 21 + font-weight: 500; 22 + font-style: normal; 23 + } 24 + 25 + @font-face { 26 + font-family: 'Fira Code'; 27 + src: url('woff2/FiraCode-SemiBold.woff2') format('woff2'), 28 + url("woff/FiraCode-SemiBold.woff") format("woff"); 29 + font-weight: 600; 30 + font-style: normal; 31 + } 32 + 33 + @font-face { 34 + font-family: 'Fira Code'; 35 + src: url('woff2/FiraCode-Bold.woff2') format('woff2'), 36 + url("woff/FiraCode-Bold.woff") format("woff"); 37 + font-weight: 700; 38 + font-style: normal; 39 + } 40 + 41 + @font-face { 42 + font-family: 'Fira Code VF'; 43 + src: url('woff2/FiraCode-VF.woff2') format('woff2-variations'), 44 + url('woff/FiraCode-VF.woff') format('woff-variations'); 45 + /* font-weight requires a range: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide#Using_a_variable_font_font-face_changes */ 46 + font-weight: 300 700; 47 + font-style: normal; 48 + }
+95
fonts/Fira_Code_v6/specimen.html
··· 1 + <!DOCTYPE html> 2 + <html lang="en"> 3 + <head> 4 + <meta charset="UTF-8"> 5 + <meta name="viewport" content="width=device-width,initial-scale=1.0"> 6 + <title>Fira Code Specimen</title> 7 + 8 + <link rel="stylesheet" href="fira_code.css"> 9 + <style> 10 + body { font: 14px/1.5em "Fira Code"; } 11 + .code { 12 + font-feature-settings: "calt" 1; /* Enable ligatures for IE 10+, Edge */ 13 + text-rendering: optimizeLegibility; /* Force ligatures for Webkit, Blink, Gecko */ 14 + width: 30em; 15 + margin: 5em auto; 16 + white-space: pre-wrap; 17 + word-break: break-all; 18 + } 19 + .light { font-weight: 300; } 20 + .regular { font-weight: 400; } 21 + .medium { font-weight: 500; } 22 + .semibold { font-weight: 600; } 23 + .bold { font-weight: 700; } 24 + .variable { font-family: 'Fira Code VF'; font-variation-settings: 'wght' 400; } 25 + i { font-style: normal; color: #c33; } 26 + b { font-weight: inherit; color: #c33; } 27 + </style> 28 + <script type="text/javascript"> 29 + function onWeightChange(weight) { 30 + // code_variable.style['font-weight'] = weight; 31 + code_variable.style['font-variation-settings'] = "'wght' " + weight; 32 + span_wght.innerText = weight; 33 + } 34 + </script> 35 + <body> 36 + 37 + <div class="code light"><b># Fira Code Light</b> 38 + 39 + take = (n, [x, <i>...</i>xs]:list) <i>--&gt;</i> 40 + | n <i>&lt;=</i> 0 <i>=&gt;</i> [] 41 + | empty list <i>=&gt;</i> [] 42 + | otherwise <i>=&gt;</i> [x] <i>++</i> take n-1, xs 43 + 44 + last3 = reverse <i>&gt;&gt;</i> take 3 <i>&gt;&gt;</i> reverse</div> 45 + 46 + 47 + <div class="code regular"><b># Fira Code Regular</b> 48 + 49 + take = (n, [x, <i>...</i>xs]:list) <i>--></i> 50 + | n <i>&lt;=</i> 0 <i>=&gt;</i> [] 51 + | empty list <i>=&gt;</i> [] 52 + | otherwise <i>=&gt;</i> [x] <i>++</i> take n-1, xs 53 + 54 + last3 = reverse <i>&gt;&gt;</i> take 3 <i>&gt;&gt;</i> reverse</div> 55 + 56 + 57 + <div class="code medium"><b># Fira Code Medium</b> 58 + 59 + take = (n, [x, <i>...</i>xs]:list) <i>--&gt;</i> 60 + | n <i>&lt;=</i> 0 <i>=&gt;</i> [] 61 + | empty list <i>=&gt;</i> [] 62 + | otherwise <i>=&gt;</i> [x] <i>++</i> take n-1, xs 63 + 64 + last3 = reverse <i>&gt;&gt;</i> take 3 <i>&gt;&gt;</i> reverse</div> 65 + 66 + 67 + <div class="code semibold"><b># Fira Code SemiBold</b> 68 + 69 + take = (n, [x, <i>...</i>xs]:list) <i>--&gt;</i> 70 + | n <i>&lt;=</i> 0 <i>=&gt;</i> [] 71 + | empty list <i>=&gt;</i> [] 72 + | otherwise <i>=&gt;</i> [x] <i>++</i> take n-1, xs 73 + 74 + last3 = reverse <i>&gt;&gt;</i> take 3 <i>&gt;&gt;</i> reverse</div> 75 + 76 + 77 + <div class="code bold"><b># Fira Code Bold</b> 78 + 79 + take = (n, [x, <i>...</i>xs]:list) <i>--&gt;</i> 80 + | n <i>&lt;=</i> 0 <i>=&gt;</i> [] 81 + | empty list <i>=&gt;</i> [] 82 + | otherwise <i>=&gt;</i> [x] <i>++</i> take n-1, xs 83 + 84 + last3 = reverse <i>&gt;&gt;</i> take 3 <i>&gt;&gt;</i> reverse</div> 85 + 86 + <div id="code_variable" class="code variable"><b># Fira Code Variable</b> 87 + 88 + <input type="range" min="300" max="700" value="400" step="10" style="width: 300px;" oninput="onWeightChange(this.value)" onchange="onWeightChange(this.value)"> <span id="span_wght">400</span> 89 + 90 + take = (n, [x, <i>...</i>xs]:list) <i>--&gt;</i> 91 + | n <i>&lt;=</i> 0 <i>=&gt;</i> [] 92 + | empty list <i>=&gt;</i> [] 93 + | otherwise <i>=&gt;</i> [x] <i>++</i> take n-1, xs 94 + 95 + last3 = reverse <i>&gt;&gt;</i> take 3 <i>&gt;&gt;</i> reverse</div>
fonts/Fira_Code_v6/ttf/FiraCode-Bold.ttf

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/ttf/FiraCode-Light.ttf

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/ttf/FiraCode-Medium.ttf

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/ttf/FiraCode-Regular.ttf

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/ttf/FiraCode-Retina.ttf

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/ttf/FiraCode-SemiBold.ttf

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/variable_ttf/FiraCode-VF.ttf

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/woff/FiraCode-Bold.woff

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/woff/FiraCode-Light.woff

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/woff/FiraCode-Medium.woff

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/woff/FiraCode-Regular.woff

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/woff/FiraCode-SemiBold.woff

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/woff/FiraCode-VF.woff

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/woff2/FiraCode-Bold.woff2

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/woff2/FiraCode-Light.woff2

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/woff2/FiraCode-Medium.woff2

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/woff2/FiraCode-Regular.woff2

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/woff2/FiraCode-SemiBold.woff2

This is a binary file and will not be displayed.

fonts/Fira_Code_v6/woff2/FiraCode-VF.woff2

This is a binary file and will not be displayed.

fonts/NerdFontsSymbolsOnly/Symbols-1000-em Nerd Font Complete Mono Windows Compatible.ttf

This is a binary file and will not be displayed.

fonts/NerdFontsSymbolsOnly/Symbols-1000-em Nerd Font Complete Mono.ttf

This is a binary file and will not be displayed.

fonts/NerdFontsSymbolsOnly/Symbols-1000-em Nerd Font Complete Windows Compatible.ttf

This is a binary file and will not be displayed.

fonts/NerdFontsSymbolsOnly/Symbols-1000-em Nerd Font Complete.ttf

This is a binary file and will not be displayed.

fonts/NerdFontsSymbolsOnly/Symbols-2048-em Nerd Font Complete Mono Windows Compatible.ttf

This is a binary file and will not be displayed.

fonts/NerdFontsSymbolsOnly/Symbols-2048-em Nerd Font Complete Mono.ttf

This is a binary file and will not be displayed.

fonts/NerdFontsSymbolsOnly/Symbols-2048-em Nerd Font Complete Windows Compatible.ttf

This is a binary file and will not be displayed.

fonts/NerdFontsSymbolsOnly/Symbols-2048-em Nerd Font Complete.ttf

This is a binary file and will not be displayed.

+8
fonts/NerdFontsSymbolsOnly/readme.md
··· 1 + 2 + # Nerd Fonts 3 + 4 + This is an archived font from a Nerd Fonts release. 5 + 6 + For more information see: 7 + * https://github.com/ryanoasis/nerd-fonts/ 8 + * https://github.com/ryanoasis/nerd-fonts/releases/latest/