3 Star 15 Fork 1

Gitee 极速下载 / FiraCode

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/tonsky/FiraCode
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
OFL-1.1

Fira Code: 免费的编程连字等宽字体

Fira Code

问题

开发者们使用的多标记,通常都是用几个字符编码。对于人的大脑来说,像-><=:=这样的序列是单一的逻辑标记,即使它们在屏幕上显示两到三个字符。您的眼睛并非无消耗的来扫描、解析并将多个字符连接到一个逻辑字符中。理想情况下,所有编程语言都应该为操作符设计成熟的Unicode符号,但现在还不是这样。

解决方案

Fira Code是一种免费的等宽字体,包含常用的编程语言中多种字符组合的连字。这只是一个字体呈现功能,底层代码仍然与ASCII兼容。这有助于更快地阅读和理解代码。对于一些常见的序列,如..//,连字允许我们纠正间距。

下载和安装

Fira_Code_v6.2.zip - December 6, 2021 - 2.5 MB

下一步:

赞助商

Sponsor

Fira Code 是个人的空闲时间进行的项目,缺乏资金但有大量的 功能请求积压。如果你也热爱这个项目, 请考虑通过 GitHub SponsorsPatreon 来支持它的发展。任何帮助都很重要!

非常感谢:

WorkOS
Your app, enterprise-ready.
Start selling to enterprise customers with just a few lines of code. Add Single Sign-On (and more) in minutes instead of months.

字体里都有哪些特征?

左侧:Fira Code中呈现的连字。右侧:没有连字的相同字符序列。

Fira Code 带有种类繁多的箭头。更棒的是:您可以随心所欲地制作它们,并根据需要组合开始/中间/结束片段!

Fira Code 不仅与连字有关,还对标点符号和频繁的字母对进行了一些微调。

Fira Code 带有各种各样的箭头,更棒的是,您可以随心所欲地制作它们,并且可以任意组合开始/中间/结束片段!如何启用

可以使用样式集/字符变体更改或启用某些连字:

作为一种编程字体,Fira Code 对 ASCII/框绘图、powerline和其他形式的控制台 UI 具有出色的支持:

Fira Code 是第一个提供专用字形来渲染进度条的编程字体:

在运行中:

我们希望更多的编程字体能够采用这个约定并发布自己的版本。

Unicode 覆盖使 Fira Code 成为数学写作的绝佳选择:

它看起来怎样?

编辑器兼容性列表

支持 不支持
Abricotine Arduino IDE
Android Studio (2.3+, 说明) Adobe Dreamweaver
Anjuta (除非在 EOF) Delphi IDE
AppCode (2016.2+, 说明) Standalone Emacs (解决方法)
Atom 1.1 或更新版本 (说明) KDevelop 4
BBEdit (14.6+, 说明) Monkey Studio IDE
Brackets (使用 此插件)
Chocolat UltraEdit
CLion (2016.2+, 说明)
Cloud9 (说明)
Coda 2
CodeLite
CodeRunner
Comma (在 首选项 > 编辑器 > 字体 中)
CotEditor
Eclipse
elementary Code
Geany (1.37+)
gEdit / Pluma
GNOME Builder
Godot
GoormIDE (说明)
gVim (Windows, GTK)
IntelliJ IDEA (2016.2+, 说明)
Kate, KWrite
KDevelop 5+
Komodo
Leafpad
LibreOffice
LightTable (说明)
LINQPad
MacVim 7.4 或更新版本 (说明)
Mancy
MATLAB (说明)
Meld
Mousepad
NeoVim-gtk
NetBeans
Notepad (Windows)
Notepad++ (解决方法)
Notepad3 (说明)
Nova
PhpStorm (2016.2+, 说明)
PyCharm (2016.2+, 说明)
QOwnNotes (21.16.6+)
QtCreator
Rider
RStudio (说明)
RubyMine (2016.2+, 说明)
Scratch
Scribus (1.5.3+)
SublimeText (3146+)
Spyder IDE (仅适用于 Qt5)
SuperCollider 3
TeXShop
TextAdept (Linux, macOS)
TextEdit
TextMate 2
VimR (说明)
Visual Studio (2015+, 说明)
Visual Studio Code (说明)
WebStorm (2016.2+, 说明)
Xamarin Studio/Monodevelop
Xcode (8.0+, 否则 使用插件)
Xi
Probably work: Smultron, Vico Under question: Code::Blocks IDE

终端兼容性列表

支持 不支持
crosh (说明) Alacritty
Hyper (参见 #3607) Cmder
iTerm 2 ConEmu
Kitty GNOME Terminal
Konsole gtkterm (需求)
Mintty guake (需求)
QTerminal LXTerminal (需求)
st (补丁) mate-terminal
Terminal.app PuTTY
Termux rxvt
Token2Shell sakura (需求)
Wez’s terminal Terminator (需求)
Windows Terminal terminology
ZOC (macOS) Windows Console
xfce4-terminal (需求)
xterm
ZOC (Windows)

浏览器支持

<!-- HTML -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/fira_code.css">
/* CSS */
@import url(https://cdn.jsdelivr.net/npm/firacode@6.2.0/distr/fira_code.css);
/* Specify in CSS */
code { font-family: 'Fira Code', monospace; }

@supports (font-variation-settings: normal) {
  code { font-family: 'Fira Code VF', monospace; }
}
  • IE 10+, Edge Legacy: 启用 font-feature-settings: "calt";
  • Firefox
  • Safari
  • Chromium-based browsers (Chrome, Opera)
  • ACE
  • CodeMirror (enable with font-variant-ligatures: contextual;)

使用 Fira Code的项目

备选方案

带连字的免费等宽字体:

带连字的付费等宽字体:

在本地构建 Fira Code

如果您想更改 FiraCode.glyphs 并自己构建 OTF / TTF / WOFF 文件,这是我在 macOS 上使用的设置:

# 安装所有编译需要的工具
./script/bootstrap_macos.sh

# 编译字体文件
./script/build.sh

# 将otf文件安装到 ~/Library/Fonts
cp distr/otf/*.otf ~/Library/Fonts

或者,您可以使用 Docker 构建 Fira Code:

# install dependencies in a container and build the font files
make

# package the font files from dist/ into a zip
make package

如果你想要永久开启某个特定的文体集或者字符变种,但你的编辑器有可能不允许你单独开启它们,你可以将你想要的功能作为一个用逗号分隔的列表,通过 -f / --features 标志来加入到编译脚本中。
默认:无。

要分隔不同的字体版本的话,你可以用 -n / --family-name 标志来指定你所需的字体系列名称。特殊值 'features' 将在默认的系列名称后面添加一个有序的、空格分隔的列表,列表内为已经启用的功能。
默认:"Fira Code"

你也可以用 -w / --weights 选项来限制将要被编译的字体的重量。
默认:"Light,Regular,Retina,Medium,SemiBold,Bold"

# 在你本地的shell中
./script/build.sh --features "ss02,ss08,ss10,cv03,cv07,cv14" --family-name "Fira Code straight" --weights "Regular,Bold"

# 或者通过一个docker容器 (创建系列名为:'Fira Code cv01 cv02 cv06 cv31 onum ss01 ss03 ss04 zero')
docker run --rm -v "${PWD}":/opt tonsky/firacode:latest ./script/build.sh -f "cv01,cv02,cv06,ss01,zero,onum,ss03,ss04,cv31" -n "features"

制作人员

Copyright (c) 2014, The Fira Code Project Authors (https://github.com/tonsky/FiraCode) This Font Software is licensed under the SIL Open Font License, Version 1.1. This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL ----------------------------------------------------------- SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 ----------------------------------------------------------- PREAMBLE The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS "Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. "Reserved Font Name" refers to any names specified as such after the copyright statement(s). "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). "Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. 3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. 5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION This license becomes null and void if any of the above conditions are not met. DISCLAIMER THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.

简介

FiraCode 是等宽字体的编程纽带 展开 收起
OFL-1.1
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/mirrors/FiraCode.git
git@gitee.com:mirrors/FiraCode.git
mirrors
FiraCode
FiraCode
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891