Skip to content

Latest commit

 

History

History
672 lines (527 loc) · 41.6 KB

readme_tw.md

File metadata and controls

672 lines (527 loc) · 41.6 KB

Nerd Fonts Logo

Iconic font aggregator, collection, and patcher

Releases   |   Fonts   |   Font Patcher   |   Wiki Documentation   |   Stickers   |   VimDevIcons

GitHub release Gitter Code of Conduct PRs Welcome Nerd Fonts - OS Support Twitter

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

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

@SankeyMATIC Diagram

創建圖表的工具為: @SankeyMATIC

重要提示

目錄

TL;DR

安裝選項

特徵

開發者 / 貢獻者

專案目的

附錄

TL;DR

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

多種字體下載選項

如果你...

字形集

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

請見 Wiki: Glyph Sets and Codepoints for more details

Shell 中的 Icon 名稱

請見 Wiki: Icon names in shell

字體包

Font Name Font Name and Repository ver *RFN Status
3270 Nerd Font 3270 3.0.1 NO w m2 l
Agave Agave 37 NO w m2 l
AnonymicePro Nerd Font Anonymous Pro 1.002 YES w m2 l
Arimo Arimo 1.33 NO w m2 l
Aurulent Sans Mono Nerd Font Stephen G. Hartke NO w m2 l
BigBlueTerminal VileR NO w m2 l
Bitstrom Wera Nerd Font Bitstream Inc 1.1 YES w m2 l
Blex Mono IBM Plex Mono 2.3 YES w m2 l
Caskaydia Cove Nerd Font Cascadia Code 2111.01 YES w m2 l
Code New Roman Nerd Font Sam Radian 2.0 NO w m2 l
[Comic Shanns Mono Nerd Font][p-comic] [Comic Shanns Mono][f-comic] 1.3 NO w m2 l
Cousine Nerd Font Cousine 1.211 NO w m2 l
DaddyTimeMono DaddyTimeMono 1.2.3 NO w m2 l
DejaVu Sans Mono Nerd Font [DejaVu][f-dejavu] 2.37 NO w m2 l
Droid Sans Mono Nerd Font Ascender Corp 1.00-113 NO w m2 l
Fantasque Sans Nerd Font Fantasque Sans 1.8.0 NO w m2 l
Fira Code Nerd Font Fira Code 6.2 NO w m2 l
Fira Mono Nerd Font Fira 3.206 NO w m2 l
Go Mono Nerd Font Go-Mono 2.010 NO w m2 l
Gohu Nerd Font Gohu TTF,Gohu 2.0 NO w m2 l
Hack Nerd Font Hack 3.003 NO w m2 l
Hasklug Nerd Font Hasklig 1.2 YES w m2 l
Heavy Data Mono Nerd Font Vic Fieger 1 NO w m2 l
Hurmit Nerd Font [Hermit][f-hermit] 2.0 YES w m2 l
iM-Writing iA-Writer Dec 2018 YES w m2 l
Inconsolata Nerd Font [Inconsolata][f-inconsolata] 3.000 NO w m2 l
Inconsolata Go Nerd Font [InconsolataGo][f-inconsolatago] 1.013 NO w m2 l
Inconsolata LGC Nerd Font [Inconsolata LGC][f-inconsolatalgc] 1.3 NO w m2 l
Iosevka Nerd Font Iosevka 22.1.0 NO w m2 l
[Iosevka Term Nerd Font][p-iosevka-term] Iosevka Term 22.1.0 NO w m2 l
JetBrains Mono JetBrains Mono 2.304 NO w m2 l
Lekton Nerd Font [Lekton][f-lekton] 34 NO w m2 l
Literation Mono Nerd Font Liberation 2.1.5 YES w m2 l
Lilex Nerd Font Lilex 2.300 NO w2 m2 l
Meslo Nerd Font [Meslo][f-meslo] 1.21 NO w m2 l
Monofur Nerd Font Tobias B Koehler 1.0 NO w m2 l
Monoid Nerd Font Monoid 0.61 NO w m2 l
Mononoki Nerd Font Mononoki 1.6 YES w m2 l
M+ (MPlus) Nerd Font [M+ Fonts][f-mplus] 2023/03 NO w m2 l
Noto [Noto][f-noto] div NO w m2 l
OpenDyslexic [OpenDyslexic][f-opendyslexic] 2.001 NO w m2 l
Overpass [Overpass][f-overpass] 3.0.5 NO w m2 l
ProFont (Windows tweaked) Nerd Font [ProFont][f-profont] 2.3 NO w m2 l
ProFont (x11) Nerd Font [ProFont][f-profont] 2.2 NO w m2 l
ProggyClean Nerd Font Tristan Grimmer 2004/04/15 NO Imperfect
Roboto Mono [Roboto Mono][f-roboto] 3.0 NO w m2 l
Sauce Code Nerd Font Source 2.038 YES w m2 l
Shure Tech Mono Nerd Font Share Tech Mono 1.003 YES w m2 l
Space Mono Nerd Font Space Mono 1.001 NO w m2 l
Terminess Nerd Font Terminus TTF 4.49.2 YES w m2 l
Tinos [Tinos][f-tinos] 1.23 NO w m2 l
Ubuntu Nerd Font [Ubuntu Font][f-ubuntu] 0.83 NO w m2 l
Ubuntu Mono Nerd Font [Ubuntu Font][f-ubuntu] 0.80 NO w m2 l
Victor Mono Victor Mono 1.5.4 NO 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 r elease下載所需的字體

選項3: 腳本安裝

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

: Requires cloning the repo as of now

所有字體:

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

或是在 Powershell (僅限 Windows)

./install.ps1

單獨字體:

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

或是在 Powershell (僅限 Windows):

./install.ps1 <FontName>
./install.ps1 Hack
./install.ps1 HeavyData
./install.ps1 FiraCode, Hack
./install.ps1 CascadiaCode -WindowsCompatibleOnly
./install.ps1 DejaVuSansMono -WhatIf

選項4: Homebrew 字體

適用於 macOS 系統Homebrew使用者。

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

brew install font-hack-nerd-font

選項5: 複製 Repo

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

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

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

git clone --depth 1

如果你想要複製一個子目錄,使用 git sparse-checkout。以下指令至少需要 Git v2.26

git clone --filter=blob:none --sparse git@github.com:ryanoasis/nerd-fonts
cd nerd-fonts
git sparse-checkout add patched-fonts/JetBrainsMono

選項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/HEAD/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/HEAD/patched-fonts/DroidSansMono/complete/Droid%20Sans%20Mono%20Nerd%20Font%20Complete.otf

選項7: 非官方 Arch Community Repository

Most fonts are available via Arch Community packages. Some special packages are in AUR.

列表尚未完成,但你可以在這邊找到完整的列表

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

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

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

請見: Font Patcher 的使用方法

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

Nerd Fonts Patcher

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

  • 需要: Python 3, python-fontforge package (version 20141231 或者更新版本,請見 安裝說明)
  • OSX 上的替代安裝方法為: brew install fontforge
  • Linux 上的替代安裝方法: 使用 AppImage
  • Docker 上的替代安裝方法: Docker Hub
  • 使用:

    ./font-patcher PATH_TO_FONT
    
  • 替代方案: 使用 script flag 透過 FontForge binary 來執行打包:

    ./fontforge -script font-patcher PATH_TO_FONT
    
  • 使用 AppImage:

    : 下載 AppImage 後需執行 chmod u+x 指令. 所有路徑皆需使用絕對路徑,並且需要明確的輸出路徑! 如果所有內容都在同一個目錄下, 你可以使用 $PWD.

    ./FontForge.AppImage -script $PWD/font-patcher $PWD/BaseFont.ttf -out /tmp
    
  • 使用 Docker:

    docker run -v /path/to/fonts:/in:Z -v /path/for/output:/out:Z nerdfonts/patcher [OPTIONS]
    

完整選項:

Nerd Fonts Patcher v3.0.2 (4.4.0) (ff 20230101)
usage: font-patcher [-h] [-v] [-s] [-l] [-q] [-c] [--careful] [--removeligs] [--postprocess [POSTPROCESS]] [--configfile [CONFIGFILE]] [--custom [CUSTOM]]
                    [-ext [EXTENSION]] [-out [OUTPUTDIR]] [--glyphdir [GLYPHDIR]] [--makegroups [{-1,0,1,2,3,4,5,6}]] [--variable-width-glyphs]
                    [--has-no-italic] [--progressbars | --no-progressbars] [--debug [{0,1,2,3}]] [--dry] [--xavgcharwidth [XAVGWIDTH]] [--fontawesome]
                    [--fontawesomeextension] [--fontlogos] [--octicons] [--codicons] [--powersymbols] [--pomicons] [--powerline] [--powerlineextra]
                    [--material] [--weather]
                    font

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

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

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

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -s, --mono, --use-single-width-glyphs
                        Whether to generate the glyphs as single-width not double-width (default is double-width)
  -l, --adjust-line-height
                        Whether to adjust line heights (attempt to center powerline separators more evenly)
  -q, --quiet, --shutup
                        Do not generate verbose output
  -c, --complete        Add all available Glyphs
  --careful             Do not overwrite existing glyphs if detected
  --removeligs, --removeligatures
                        Removes ligatures specificed in JSON configuration file
  --postprocess [POSTPROCESS]
                        Specify a Script for Post Processing
  --configfile [CONFIGFILE]
                        Specify a file path for JSON configuration file (see sample: src/config.sample.json)
  --custom [CUSTOM]     Specify a custom symbol font, all glyphs will be copied; absolute path suggested
  -ext [EXTENSION], --extension [EXTENSION]
                        Change font file type to create (e.g., ttf, otf)
  -out [OUTPUTDIR], --outputdir [OUTPUTDIR]
                        The directory to output the patched font file to
  --glyphdir [GLYPHDIR]
                        Path to glyphs to be used for patching
  --makegroups [{-1,0,1,2,3,4,5,6}]
                        Use alternative method to name patched fonts (recommended)
  --variable-width-glyphs
                        Do not adjust advance width (no "overhang")
  --has-no-italic       Font family does not have Italic (but Oblique)
  --progressbars        Show percentage completion progress bars per Glyph Set (default)
  --no-progressbars     Don't show percentage completion progress bars per Glyph Set
  --debug [{0,1,2,3}]   Verbose mode (optional: 1=just to file; 2*=just to terminal; 3=display and file)
  --dry                 Do neither patch nor store the font, to check naming
  --xavgcharwidth [XAVGWIDTH]
                        Adjust xAvgCharWidth (optional: concrete value)

Symbol Fonts:
  --fontawesome         Add Font Awesome Glyphs (http://fontawesome.io/)
  --fontawesomeextension
                        Add Font Awesome Extension Glyphs (https://andrelzgava.github.io/font-awesome-extension/)
  --fontlogos, --fontlinux
                        Add Font Logos Glyphs (https://github.com/Lukas-W/font-logos)
  --octicons            Add Octicons Glyphs (https://octicons.github.com)
  --codicons            Add Codicons Glyphs (https://github.com/microsoft/vscode-codicons)
  --powersymbols        Add IEC Power Symbols (https://unicodepowersymbol.com/)
  --pomicons            Add Pomicon Glyphs (https://github.com/gabrielelana/pomicons)
  --powerline           Add Powerline Glyphs
  --powerlineextra      Add Powerline Glyphs (https://github.com/ryanoasis/powerline-extra-symbols)
  --material, --materialdesignicons, --mdi
                        Add Material Design Icons (https://github.com/templarian/MaterialDesign)
  --weather, --weathericons
                        Add Weather Icons (https://github.com/erikflowers/weather-icons)

範例

./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

./FontForge.AppImage -script /tmp/nerdfonts/font-patcher /tmp/nerdfonts/CascadiaMonoPL-Semibold.ttf --fontawesome -out /tmp
./FontForge.AppImage -script $PWD/font-patcher $PWD/CascadiaMonoPL-Semibold.ttf --octicons -out $HOME

docker run --rm -v ~/myfont/patchme:/in:Z -v ~/myfont/patched:/out:Z nerdfonts/patcher
docker run --rm -v ~/Desktop/myfont/patchme:/in:Z -v ~/Desktop/myfont/patched:/out:Z nerdfonts/patcher --fontawesome

Gotta Patch 'em All Font Patcher!

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

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

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

    ./gotta-patch-em-all-font-patcher\!.sh Hermit
    

貢獻

請見 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

其他的好字體

一個包含更多好字體的列表,可惜的是,因為授權問題我們不能提供或分享它們:

專案目的

請見 Wiki: Project Purpose

更新日誌

請見 changelog.md

授權

請見 LICENSE