Skip to content

Latest commit

 

History

History
633 lines (471 loc) · 33.8 KB

readme_tw.md

File metadata and controls

633 lines (471 loc) · 33.8 KB

Nerd Fonts Logo

GitHub release Gitter CodeClimate Code of Conduct PRs Welcome   Windows Logo   macOS (OSX) Logo   Linux Logo

Nerd Fonts 是一個使用大量字體圖示來解決程式設計師在開發過程中缺少合適字體的問題的專案。它可以從流行的字體圖示庫中將大量外部字體引入待開發的專案中,它支持的字體圖示庫包括 Font Awesome ➶, Devicons ➶, Octicons ➶, and others.

下面的桑基圖(Sankey Diagram)展示了Nerd Fonts中現有的字形組合:

@SankeyMATIC Diagram

創建圖表的工具為: @SankeyMATIC

快速導航

Latest Release ➶ Fonts Patcher VimDevIcons ➶ Font Package
Downloads ➶
fonts-logo-small fonts-logo-small patcher-logo-small vim-devicons-logo-small fonts-logo-small

重要提示

目錄

TL;DR

安裝選項

特征

開發者 / 貢獻者

專案的目的

附加訊息

TL;DR

Nerd Fonts 中包含流行的程式字體和字形。 如果你想要的字體沒有在現有的字體庫中,你可以使用 font patcher來自訂字體。 更多信息請見 wiki。如果你正在尋找Vim外掛,請見 VimDevIcons ➶

多種字體下載選項

如果你...

特征

字形集

🔍 🔍 你現在可以透過NerdFonts.com中的Cheat Sheet對字形進行搜索

Seti-UI + 自訂

基於 Seti-UI Icomoon 的額外自訂字形。

image

一個為開發者,code jedis,ninjas,HTTPsters,evangelists 和 nerds(sic)制作的圖示字體。 / (repo) / (website)

image

字體圖示和 CSS 工具包。 / (repo) / (website)

image image image image

簡單的 Font Awesome 補充包。 / (repo) / (website)

image

GitHub's 圖示. / (repo) / (website)

Nerd Font Complete Codepoints:*

image

* To avoid conflicts between icon sets, these were modified in the 'Complete' fonts. To view the original codepoints see the Wiki.

提供額外的 Powerline separator 字體 和 a column number glyph (CN). / (repo)

image

向Unicode中加入新符號 / (website)

image image

Font-linux 是一個包含LOGO和linux流行布局的圖示字體。 / (repo)

image

8 個符號 "Pomodoro Technique"®. / (repo)

image

Shell中的Icon 名稱

bin/scripts/lib/路徑中下載 .sh 文件, 推薦的文件位置為 ~/.local/share/fonts/ 或者 ~/bin/.

  • i_all.sh - 幫助你載入你下載的所有文件
  • i_dev.sh - Devicons (198 icons, 8 does not have an established name)
  • i_fa.sh - Font Awesome (675 icons, 111 aliases)
  • i_fae.sh - Font Awesome Extension (170 icons)
  • i_iec.sh - IEC Power Symbols (5 icons)
  • i_linux.sh - Font Linux (20 icons)
  • i_oct.sh - Octicons (172 icons)
  • i_ple.sh - Powerline Extra Symbols (37 icons, 2 aliases, 16 does not have an established name)
  • i_pom.sh - Pomicons (11 icons)
  • i_seti.sh - Seti-UI + Custom (50 icons, 2 aliases, 5 does not have an established name)

然後 source 所需的文件並且輸出 $i_* variables 去尋找字體:

source ~/.local/share/fonts/i_oct.sh
echo $i_oct_heart
# Output:
#

NOTE: You have to use one of the Nerd Fonts to see correct icons for some icon sets (Devicons, Font Awesome Extension, Font Linux), but other sets should work with their standard fonts too.

字體補丁

Font Name Font Name and Repository *RFN EM Size Status
3270 Nerd Font 3270 NO 1000 w2 m2 l2
Anonymice Nerd Font Anonymous Pro NO 2048 w m2 l
Aurulent Sans Mono Nerd Font NO 1000 w m2 l
Bitstream Vera Sans Mono Nerd Font NO 2048 w m2 l
Code New Roman Nerd Font NO 2048 w m2 l
DejaVu Sans Mono Nerd Font NO 2048 w m2 l
Droid Sans Mono Nerd Font NO 2048 w m2 l
Fantasque Sans Nerd Font Fantasque Sans NO 2048 w m2 l
Fura Code Nerd Font Fira YES 1000 w m2 l
Fura Mono Nerd Font Fira YES 1000 w m2 l
Gohu Nerd Font Gohu NO 1000 w2 m2 l2
Hasklug Nerd Font Hasklig YES 1000 w m2 l
Heavy Data Mono Nerd Font NO 2048 w m2 l
Hermut Nerd Font NO 1000 w m2 l
Inconsolata Nerd Font NO 1000 w m2 l
Inconsolata Go Nerd Font NO 1000 w m2 l
Iosevka Nerd Font Iosevka YES 1000 #83
JetBrains Mono JetBrains Mono NO 1000 w m2 l
Knack Nerd Font Hack YES 2048 w m2 l
Lekton Nerd Font NO 1000 w m2 l
Literation Mono Nerd Font Liberation YES 2048 w m2 l
Meslo Nerd Font NO 2048 w m2 l
Monofur Nerd Font NO 2400 w m2 l
Monoid Nerd Font NO 1536 w m2 l
Mononoki Nerd Font Mononoki NO 1024 w m2 l
M+ (MPlus) Nerd Font NO 1000 w m2 l
ProFont (Windows tweaked) Nerd Font NO 1200 w m2 l
ProFont (x11) Nerd Font NO 1000 [FAILING]
ProggyClean Nerd Font NO 2048 [FAILING]
Roboto Mono NO 2048 [FAILING]
Sauce Code Nerd Font Source YES 1000 w m2 l
Shure Tech Mono Nerd Font Share Tech Mono YES 1000 w m2 l
Space Mono Nerd Font Space Mono NO 1000 w m2 l
Terminess Nerd Font Terminus Font YES 1000 w m2 l
Ubuntu Nerd Font NO 1000 w m2 l
Ubuntu Mono Nerd Font NO 1000 w m2 l

*RFN = Reserved Font Name

字體集

  • 超過 1,485,000個 獨立的 變化/組合(Power Set)字體包:
    • 50個 字體合集
    • 719個 字體家族
    • 2,876個 ‘完全’的 變化/組合字體
    • 1,485,410個 有可能的 變化/組合字體
    • 1,488,286個 總字體數 (2,876 + 1,485,410)
  • 每種字體的組合都是任意 Variations的組合

Variations

字體安裝

選項1: 手動下載並安裝

安裝特定 單獨字體最快方法。

下載你選中的特定字體 patched font

選項2: 下載發佈存檔

適用於當你需要archive或者完整的字體家族(Bold, Italic, etc.)的情況。

你可以以壓縮檔的形式從latest release下載所需的字體

選項3: 安裝腳本

適用於當你想要 自動 安裝或者使用 scripts 的情況。

: 僅適用於 Linux & macOS (OS X) : Requires cloning the repo as of now

所有字體:

  • 安裝全部的字體包 (警告:字體的數量眾多,需要下載的文件體積巨大)
./install.sh

單獨字體:

  • 安裝你所需的單獨字體
./install.sh <FontName>
./install.sh Hack
./install.sh HeavyData

選項4: Homebrew 字體

適用於 macOS系統Homebrew使用者。

所有字體都可以透過 Homebrew 字體 從 macOS (OS X)平台上找到

brew tap caskroom/fonts
brew cask install font-hack-nerd-font

選項5: 複製 Repo

適用於要使用 完全控制, 所有 或者 多數 字體的情況,或者為Nerd Fonts的開發 盡一份力的情況。

基於效率考慮,如果你只想使用有限的幾種字體,我們不推薦複製這個 repository。

但是如果你想要複製這個repo,請確認你_shallow_複製了它:

git clone --depth 1

選項6: Ad Hoc Curl 下載

適用於當你想要使用 curl command 或者在 scripts中使用它的情況。

Linux

mkdir -p ~/.local/share/fonts
cd ~/.local/share/fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete.otf

註: deprecated alternative paths: ~/.fonts

macOS (OS X)

cd ~/Library/Fonts && curl -fLo "Droid Sans Mono for Powerline Nerd Font Complete.otf" https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete.otf

選項7: 非官方 Arch User Repository (AUR)

適用於 Arch Linux 下使用 AUR packages的情況

下列字體可以在Arch Linux透過 AUR packages 下載:

選項8: 打包你的個人字體

適用於 patching 你的 個人字體 或者完全 自訂 字體補丁。

在你的個人字體中使用 Python 命令行腳本去增加新的字形並生成字體包

請見: Font Patcher 的使用方法

  • 這個選項適用於當你 不想 使用 fonts provided的情況
  • 你需要複製已經生成好的字體到你系統中正確的字體資料夾中

Nerd Fonts Patcher

可以透過VimDevIcons ➶打包你選中的字體:

  • 需要: Python 2 (or Python 3), python-fontforge package (version 20141231 或者更新版本,請見 安裝說明)
  • OSX上的替代安裝方法為: brew install fontforge
  • 使用:
./font-patcher PATH_TO_FONT
  • 替代方案: 使用script flag透過FontForge binary來執行打包:
./fontforge -script font-patcher PATH_TO_FONT
usage: font-patcher [-h] [-v] [-s] [-l] [-q] [-w] [-c] [--fontawesome]
                    [--fontawesomeextension] [--fontlinux] [--octicons]
                    [--powersymbols] [--pomicons] [--powerline]
                    [--powerlineextra] [--custom [CUSTOM]]
                    [--postprocess [POSTPROCESS]]
                    [--progressbars | --no-progressbars] [--careful]
                    [-ext [EXTENSION]] [-out [OUTPUTDIR]]
                    font

Nerd Fonts Font Patcher: patches a given font with programming and development related glyphs

* Website: https://www.nerdfonts.com
* Version: 1.2.0
* Development Website: https://github.com/ryanoasis/nerd-fonts
* Changelog: https://github.com/ryanoasis/nerd-fonts/blob/master/changelog.md

positional arguments:
  font                  The path to the font to patch (e.g., Inconsolata.otf)

optional arguments:
  -h, --help            顯示幫助訊息和退出
  -v, --version         顯示程式版本和退出
  -s, --mono, --use-single-width-glyphs
                        設置生成的字體是single-width還是double-width (預設是 double-width)
  -l, --adjust-line-height
                        設置是否調整 line heights (一般應該嘗試 center powerline separators)
  -q, --quiet, --shutup
                        不生成 verbose output
  -w, --windows         將內部字體名稱限制在31個符號內 (為了 Windows 相容性)
  -c, --complete        加入所有可用的字體
  --fontawesome         加入 Font Awesome Glyphs字體 (http://fontawesome.io/)
  --fontawesomeextension
                        加入 Font Awesome 補充字體 (https://andrelzgava.github.io/font-awesome-extension/)
  --fontlinux           加入 Font Linux 字體 (https://github.com/Lukas-W/font-linux)
  --octicons            加入 Octicons 字體 (https://octicons.github.com)
  --powersymbols        加入 IEC Power Symbols (https://unicodepowersymbol.com/)
  --pomicons            加入 Pomicon 字體 (https://github.com/gabrielelana/pomicons)
  --powerline           加入 Powerline 字體
  --powerlineextra      加入 Powerline 字體 (https://github.com/ryanoasis/powerline-extra-symbols)
  --custom [CUSTOM]     指定一個自訂圖示字體,所有新字形都會在不縮放的情況下被複製。
  --postprocess [POSTPROCESS]
                        指定一個針對後續處理程式的腳本
  --progressbars        顯示每個Glyph Set的完成度進度條
  --no-progressbars     不顯示每個Glyph Set的完成度進度條
  --careful             如果發現了已經存在的字形,不要對它進行覆寫
  -ext [EXTENSION], --extension [EXTENSION]
                        更改字體文件的文件格式去創建新文件 (e.g., ttf, otf)
  -out [OUTPUTDIR], --outputdir [OUTPUTDIR]
                        將修補後的字體文件輸出到特定目錄

例子

./font-patcher Droid\ Sans\ Mono\ for\ Powerline.otf
./font-patcher Droid\ Sans\ Mono\ for\ Powerline.otf -s -q
./font-patcher Droid\ Sans\ Mono\ for\ Powerline.otf --use-single-width-glyphs --quiet
./font-patcher Droid\ Sans\ Mono\ for\ Powerline.otf -w
./font-patcher Droid\ Sans\ Mono\ for\ Powerline.otf --windows --quiet
./font-patcher Droid\ Sans\ Mono\ for\ Powerline.otf --windows --pomicons --quiet
./font-patcher Inconsolata.otf --fontawesome
./font-patcher Inconsolata.otf --fontawesome --octicons --pomicons
./font-patcher Inconsolata.otf

Gotta Patch 'em All Font Patcher!

  • 針對貢獻者和開發者使用

  • 在未打包的路徑中re-patches 所有 字體:

./gotta-patch-em-all-font-patcher\!.sh
  • 可以選擇限制到特定字體名稱模式:
./gotta-patch-em-all-font-patcher\!.sh Hermit

貢獻

See contributing.md

不穩定的文件路徑

⚠️ 警告: 基於後續的新版本發佈,文件路徑有可能被改變 (特別是 major version bumps)

注意 release 分支 不是 master分支因為路徑會因為新版本發佈而改變

  • 舉例:
    • ✅ Use: https://github.com/ryanoasis/nerd-fonts/blob/0.9.0/patched-fonts/Hermit/Medium/complete/Hurmit%20Medium%20Nerd%20Font%20Complete.otf
    • ❌ Instead of: https://github.com/ryanoasis/nerd-fonts/blob/master/patched-fonts/Hermit/Medium/complete/Hurmit%20Medium%20Nerd%20Font%20Complete.otf

其他的好字體

  • 一個包含更多好字體的列表,可惜的是,因為授權問題我們不能提供或分享它們:
  • Input Mono (license restriction)
    • Possibly coming with external hosting :)
  • PragmataPro (not free)
  • Consolas (proprietary)

專案目的

See Wiki: Project Purpose

更新日誌

See changelog.md

授權

MIT © Ryan L McIntyre