|
| 1 | +## Fira Code: プログラミング合字のフリー等幅フォント |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +[Español](./LEEME.md) | [简体中文](./README_CN.md)で読む |
| 6 | + |
| 7 | +### 問題点 |
| 8 | + |
| 9 | +プログラマは多くの記号を使用し、しばしば数文字で符号化されます。人間の脳にとって`->`、`<=`、`:=`といったシーケンスは、たとえ画面上で 2 文字や 3 文字になったとしても、単一の論理トークンである。あなたの目は、複数の文字をスキャンし、解析し、1 つの論理的なものに結合するために、ゼロではない量のエネルギーを費やしているのです。理想を言えば、すべてのプログラミング言語が演算子のための本格的なユニコード記号を備えて設計されるべきですが、まだそうではありません。 |
| 10 | + |
| 11 | +### 解決法 |
| 12 | + |
| 13 | +Fira Code は、一般的なプログラミングの複数文字の組み合わせのための合字を含む無料の等幅フォントです。これは単にフォントのレンダリング機能であり、基礎となるコードは ASCII 互換のままです。これによりコードをより速く読み、理解することができます。`...` や `//` のような頻度の高い文字列は、合字によって間隔を修正することができます。 |
| 14 | + |
| 15 | +### ダウンロードとインストール |
| 16 | + |
| 17 | +<a href="https://github.com/tonsky/FiraCode/releases/download/6.2/Fira_Code_v6.2.zip"><img alt="Fira_Code_v6.2.zip - December 6, 2021 - 2.5 MB" src="./extras/download.png" width="520"></a> |
| 18 | + |
| 19 | +次は: |
| 20 | + |
| 21 | +- [インストール方法](https://github.com/tonsky/FiraCode/wiki) |
| 22 | +- [トラブルシューティング](https://github.com/tonsky/FiraCode/wiki#troubleshooting) |
| 23 | +- [ニュースとアップデート](https://twitter.com/FiraCode) |
| 24 | + |
| 25 | +### スポンサー |
| 26 | + |
| 27 | +Fira Code は個人的なフリータイムのプロジェクトで、資金はなく膨大な[機能リクエストバックログ](https://github.com/tonsky/FiraCode/issues)を抱えています。もし気に入っていただけたなら、[GitHub Sponsors](https://github.com/sponsors/tonsky) または [Patreon](https://patreon.com/tonsky) で開発をサポートすることを検討してください。どんな支援でもかまいません! |
| 28 | + |
| 29 | +大いに感謝します: |
| 30 | + |
| 31 | +<table> |
| 32 | + <td align="center"> |
| 33 | + <a href="https://workos.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=firacode&utm_source=github"> |
| 34 | + <div> |
| 35 | + <img src="https://user-images.githubusercontent.com/629429/151508669-efb4c3b3-8fe3-45eb-8e47-e9510b5f0af1.svg" width="290" alt="WorkOS"> |
| 36 | + </div> |
| 37 | + <b>Your app, enterprise-ready.</b> |
| 38 | + <div> |
| 39 | + <sub>Start selling to enterprise customers with just a few lines of code. Add Single Sign-On (and more) in minutes instead of months.</sup> |
| 40 | + </div> |
| 41 | + </a> |
| 42 | + </td> |
| 43 | +</table> |
| 44 | + |
| 45 | +### 何が入っているのでしょうか? |
| 46 | + |
| 47 | +左: Fira Code で描画される合字。右: 合字のない同じ文字列。 |
| 48 | + |
| 49 | +<img src="./extras/ligatures.png" width="754"> |
| 50 | + |
| 51 | +Fira Code には、膨大な種類の矢印が用意されています。さらに、好きな長さにしたり、始点・中間・終点の断片を自由に組み合わせたりすることができます! |
| 52 | + |
| 53 | +<img src="./extras/arrows.png" width="754"> |
| 54 | + |
| 55 | +Fira Code は合字だけではありません。句読点や頻度の高い文字ペアについても、いくつかの微調整が行われています。 |
| 56 | + |
| 57 | +<img src="./extras/typographics.png" width="754"> |
| 58 | + |
| 59 | +Fira Code には、数種類の文字バリエーション(`cv01`、`cv02` など)、スタイルセット(`ss01`、`ss02` など)、その他のフォント機能(`zero`、`onum`、`calt` など)があり、誰もが自分に最適なものを選ぶことができます。[有効にする方法](https://github.com/tonsky/FiraCode/wiki/How-to-enable-stylistic-sets) |
| 60 | + |
| 61 | +<img src="./extras/character_variants.png" width="754"> |
| 62 | + |
| 63 | +一部の合字は、スタイルセット/文字バリアントを使用して変更または有効にすることができます: |
| 64 | + |
| 65 | +<img src="./extras/ligature_variants.png" width="754"> |
| 66 | + |
| 67 | +プログラミング用フォントである Fira Code は、ASCII/ボックスドローイング、パワーライン、その他の形式のコンソール UI に素晴らしい対応をしています: |
| 68 | + |
| 69 | +<img src="./extras/console.png" width="754"> |
| 70 | + |
| 71 | +Fira Code は、プログレスバーを描画するための専用グリフを提供する最初のプログラミングフォントです: |
| 72 | + |
| 73 | +<img src="./extras/progress.png" width="754"> |
| 74 | + |
| 75 | +動作すると: |
| 76 | + |
| 77 | +<img src="./extras/progress.gif" width="560"> |
| 78 | + |
| 79 | +より多くのプログラミング用フォントがこの規約を採用し、独自のバージョンを出荷することを望んでいます。 |
| 80 | + |
| 81 | +ユニコード対応により、Fira Code は数学の記述に最適です: |
| 82 | + |
| 83 | +<img src="./extras/math.png" width="754"> |
| 84 | + |
| 85 | +### どのように見えるのでしょうか? |
| 86 | + |
| 87 | +<img src="./extras/samples.png" width="754"> |
| 88 | +<img src="./extras/samples2.png" width="754"> |
| 89 | + |
| 90 | +### エディタ互換性リスト |
| 91 | + |
| 92 | +| サポート | 非サポート | |
| 93 | +|-------|----------------| |
| 94 | +| **Arduino IDE** (2.0+,same instructions as [vscode](https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions)) | **Adobe Dreamweaver** | |
| 95 | +| **Abricotine** | **Delphi IDE** | |
| 96 | +| **Android Studio** (2.3+, [instructions](https://github.com/tonsky/FiraCode/wiki/IntelliJ-products-instructions)) | Standalone **Emacs** ([回避方法](https://github.com/tonsky/FiraCode/wiki/Emacs-instructions)) | |
| 97 | +| **Anjuta** (unless at the EOF) | **IDLE** | |
| 98 | +| **AppCode** (2016.2+, [説明](https://github.com/tonsky/FiraCode/wiki/IntelliJ-products-instructions)) | **KDevelop 4** | |
| 99 | +| **Atom** 1.1 or newer ([説明](https://github.com/tonsky/FiraCode/wiki/Atom-instructions)) | **Monkey Studio IDE** | |
| 100 | +| **BBEdit** (14.6+ [説明](https://github.com/tonsky/FiraCode/wiki/BBEdit-instructions)) | **UltraEdit** (Windows) | |
| 101 | +| **Brackets** (with [this plugin](https://github.com/polo2ro/firacode-in-brackets)) | |
| 102 | +| **Chocolat** | |
| 103 | +| **CLion** (2016.2+, [説明](https://github.com/tonsky/FiraCode/wiki/IntelliJ-products-instructions)) | |
| 104 | +| **Cloud9** ([説明](https://github.com/tonsky/FiraCode/wiki/Cloud9-Instructions)) | |
| 105 | +| **Coda 2** | |
| 106 | +| **CodeLite** | |
| 107 | +| **CodeRunner** | |
| 108 | +| **Comma** (Under: Preferences > Editor > Font) | |
| 109 | +| **CotEditor** | |
| 110 | +| **Eclipse** | |
| 111 | +| **elementary Code** | |
| 112 | +| **Geany** (1.37+) | |
| 113 | +| **gEdit / Pluma** | |
| 114 | +| **GNOME Builder** | |
| 115 | +| **Godot** | |
| 116 | +| **GoormIDE** ([説明](https://github.com/tonsky/FiraCode/wiki/GoormIDE-Instructions)) | |
| 117 | +| **gVim** ([Windows](https://github.com/tonsky/FiraCode/issues/462), [GTK](https://vimhelp.org/options.txt.html#%27guiligatures%27)) | |
| 118 | +| **IntelliJ IDEA** (2016.2+, [説明](https://github.com/tonsky/FiraCode/wiki/IntelliJ-products-instructions)) | |
| 119 | +| **Kate, KWrite** | |
| 120 | +| **KDevelop 5+** | |
| 121 | +| **Komodo** | |
| 122 | +| **Leafpad** | |
| 123 | +| **LibreOffice** | |
| 124 | +| **LightTable** ([説明](https://github.com/tonsky/FiraCode/wiki/LightTable-instructions)) | |
| 125 | +| **LINQPad** | |
| 126 | +| **MacVim** 7.4 or newer ([説明](https://github.com/tonsky/FiraCode/wiki/MacVim-instructions)) | |
| 127 | +| **Mancy** | |
| 128 | +| **MATLAB** ([説明](https://github.com/tonsky/FiraCode/wiki/MATLAB-for-Windows-Instructions)) | |
| 129 | +| **Meld** | |
| 130 | +| **Mousepad** | |
| 131 | +| **NeoVim-gtk** | |
| 132 | +| **NetBeans** | |
| 133 | +| **Notepad** (Windows) | |
| 134 | +| **Notepad++** ([回避方法](https://github.com/notepad-plus-plus/notepad-plus-plus/issues/2287#issuecomment-256638098)) | |
| 135 | +| **Notepad3** ([説明](https://github.com/rizonesoft/Notepad3/issues/361#issuecomment-365977420))| |
| 136 | +| **Nova** | |
| 137 | +| **PhpStorm** (2016.2+, [説明](https://github.com/tonsky/FiraCode/wiki/IntelliJ-products-instructions)) | |
| 138 | +| **PyCharm** (2016.2+, [説明](https://github.com/tonsky/FiraCode/wiki/IntelliJ-products-instructions)) | |
| 139 | +| **QOwnNotes** (21.16.6+) | |
| 140 | +| **QtCreator** | |
| 141 | +| **Rider** | |
| 142 | +| **RStudio** ([説明](https://github.com/tonsky/FiraCode/wiki/RStudio-instructions)) | |
| 143 | +| **RubyMine** (2016.2+, [説明](https://github.com/tonsky/FiraCode/wiki/IntelliJ-products-instructions)) | |
| 144 | +| **Scratch** | |
| 145 | +| **Scribus** (1.5.3+) | |
| 146 | +| **SublimeText** (3146+) | |
| 147 | +| **Spyder IDE** (only with Qt5) | |
| 148 | +| **SuperCollider 3** | |
| 149 | +| **TeXShop**| |
| 150 | +| **TextAdept** (Linux, macOS) | |
| 151 | +| **TextEdit** | |
| 152 | +| **TextMate 2** | |
| 153 | +| **UltraEdit (UEX)** (Linux) | |
| 154 | +| **VimR** ([説明](https://github.com/qvacua/vimr/wiki#ligatures)) | |
| 155 | +| **Visual Studio** (2015+, [説明](https://github.com/tonsky/FiraCode/wiki/Visual-Studio-Instructions)) | |
| 156 | +| **Visual Studio Code** ([説明](https://github.com/tonsky/FiraCode/wiki/VS-Code-Instructions)) | |
| 157 | +| **WebStorm** (2016.2+, [説明](https://github.com/tonsky/FiraCode/wiki/IntelliJ-products-instructions)) | |
| 158 | +| **Xamarin Studio/Monodevelop** | |
| 159 | +| **Xcode** (8.0+, それ以外は[プラグイン付き](https://github.com/robertvojta/LigatureXcodePlugin)) | |
| 160 | +| **Xi** | |
| 161 | +| Probably work: **Smultron, Vico** | Under question: **Code::Blocks IDE** | |
| 162 | + |
| 163 | +### ターミナル互換性リスト |
| 164 | + |
| 165 | +| サポート | 非サポート | |
| 166 | +|-------|--------------| |
| 167 | +| crosh ([説明](https://github.com/tonsky/FiraCode/wiki/ChromeOS-Terminal)) | Alacritty | |
| 168 | +| Hyper ([#3607](https://github.com/vercel/hyper/issues/3607) を確認) | Asbru Connection Manager | |
| 169 | +| iTerm 2 | Cmder | |
| 170 | +| Kitty | ConEmu | |
| 171 | +| Konsole | GNOME Terminal | |
| 172 | +| Mintty | gtkterm ([チケット](https://gitlab.gnome.org/GNOME/vte/-/issues/1661)) | |
| 173 | +| QTerminal | guake ([チケット](https://gitlab.gnome.org/GNOME/vte/-/issues/1661)) | |
| 174 | +| st ([patch](https://st.suckless.org/patches/ligatures/)) | LXTerminal ([チケット](https://gitlab.gnome.org/GNOME/vte/-/issues/1661)) | |
| 175 | +| Tabby | mate-terminal | |
| 176 | +| Terminal.app | PuTTY | |
| 177 | +| Termux | rxvt | |
| 178 | +| Token2Shell | sakura ([チケット](https://gitlab.gnome.org/GNOME/vte/-/issues/1661)) | |
| 179 | +| Wez’s terminal | SecureCRT |
| 180 | +| Windows Terminal | Terminator ([チケット](https://gitlab.gnome.org/GNOME/vte/-/issues/1661)) | |
| 181 | +| ZOC (macOS) | terminology | |
| 182 | +| | Tilix | |
| 183 | +| | Windows Console | |
| 184 | +| | xfce4-terminal ([チケット](https://gitlab.gnome.org/GNOME/vte/-/issues/1661)) | |
| 185 | +| | xterm | |
| 186 | +| | ZOC (Windows) | |
| 187 | + |
| 188 | +### ブラウザサポート |
| 189 | + |
| 190 | +```html |
| 191 | +<!-- HTML --> |
| 192 | +< link rel= "stylesheet" href= "https://cdn.jsdelivr.net/npm/[email protected]/distr/fira_code.css"> |
| 193 | +``` |
| 194 | + |
| 195 | +```css |
| 196 | +/* CSS */ |
| 197 | +@import url( https://cdn.jsdelivr.net/npm/[email protected]/distr/fira_code.css); |
| 198 | +``` |
| 199 | + |
| 200 | +```css |
| 201 | +/* Specify in CSS */ |
| 202 | +code { font-family: 'Fira Code', monospace; } |
| 203 | + |
| 204 | +@supports (font-variation-settings: normal) { |
| 205 | + code { font-family: 'Fira Code VF', monospace; } |
| 206 | +} |
| 207 | +``` |
| 208 | + |
| 209 | +- IE 10+, Edge Legacy: `font-feature-settings: "calt";` で有効にします |
| 210 | +- Firefox |
| 211 | +- Safari |
| 212 | +- Chromium-based browsers (Chrome, Opera) |
| 213 | +- ACE |
| 214 | +- CodeMirror (`font-variant-ligatures: contextual;` で有効にします) |
| 215 | + |
| 216 | +### Fira Code を使用したプロジェクト |
| 217 | + |
| 218 | +- [CodePen](https://codepen.io/) |
| 219 | +- [Blink Shell](http://www.blink.sh/) |
| 220 | +- [Klipse](http://app.klipse.tech/) |
| 221 | +- [IlyaBirman.net](http://ilyabirman.net/) |
| 222 | +- [EvilMartians.com](https://evilmartians.com/) |
| 223 | +- [Web Maker](https://webmakerapp.com/) |
| 224 | +- [FromScratch](https://fromscratch.rocks/) |
| 225 | +- [PEP20.org](https://pep20.org/) |
| 226 | + |
| 227 | +### 代替品 |
| 228 | + |
| 229 | +合字のある無料等幅フォント: |
| 230 | + |
| 231 | +- [Hasklig](https://github.com/i-tu/Hasklig) |
| 232 | +- [Monoid](http://larsenwork.com/monoid/) |
| 233 | +- [Fixedsys Excelsior](https://github.com/kika/fixedsys) |
| 234 | +- [Iosevka](https://be5invis.github.io/Iosevka/) |
| 235 | +- [DejaVu Sans Code](https://github.com/SSNikolaevich/DejaVuSansCode) |
| 236 | +- [Victor Mono](https://rubjo.github.io/victor-mono/) |
| 237 | +- [Cascadia Code](https://github.com/microsoft/cascadia-code) |
| 238 | +- [JetBrains Mono](https://github.com/JetBrains/JetBrainsMono) |
| 239 | + |
| 240 | +合字のある有償等幅フォント: |
| 241 | + |
| 242 | +- [PragmataPro](http://www.fsd.it/fonts/pragmatapro.htm) |
| 243 | +- [Mono Lisa](https://www.monolisa.dev/) |
| 244 | + |
| 245 | +### Fira Code をローカルでビルドする |
| 246 | + |
| 247 | +FiraCode.glyphs を変更し、OTF/TTF/WOFF ファイルを自分でビルドしたい場合、私が macOS で使用している設定は次のとおりです: |
| 248 | + |
| 249 | +```bash |
| 250 | +# 必要なビルドツールをすべてインストール |
| 251 | +./script/bootstrap_macos.sh |
| 252 | + |
| 253 | +# フォントファイルのビルド |
| 254 | +./script/build.sh |
| 255 | + |
| 256 | +# OTF を ~/Library/Fonts にインストール |
| 257 | +cp distr/otf/*.otf ~/Library/Fonts |
| 258 | +``` |
| 259 | + |
| 260 | +または、Docker を使用して Fira Code を構築することもできます: |
| 261 | + |
| 262 | +```bash |
| 263 | +# コンテナ内に依存関係をインストールし、フォントファイルをビルド |
| 264 | +make |
| 265 | + |
| 266 | +# dist/ のフォントファイルを zip にまとめる |
| 267 | +make package |
| 268 | +``` |
| 269 | + |
| 270 | +特定のスタイルセットやキャラクタバリエーションを *永久的に* 有効にしたい場合、おそらくあなたの選んだエディタではこれらを個別に切り替えることができないため、`-f / --features` フラグでビルドスクリプトにカンマ区切りリストとして希望の機能を提供することができます。<br>デフォルト: なし。 |
| 271 | + |
| 272 | +異なるバージョンのフォントを分けるために、`-n / --family-name` フラグで希望のフォントファミリー名を指定することができます。特別な値 'features' を指定すると、有効な機能をソートしてスペースで区切ったリストをデフォルトのファミリー名に追加します。<br>デフォルト: "Fira Code" |
| 273 | + |
| 274 | +また、`-w / --weights` オプションで、作成されるフォントのウェイトを制限することができます。<br>デフォルト: "Light,Regular,Retina,Medium,SemiBold,Bold" |
| 275 | + |
| 276 | +```bash |
| 277 | +# ローカルでシェル内 |
| 278 | +./script/build.sh --features "ss02,ss08,ss10,cv03,cv07,cv14" --family-name "Fira Code straight" --weights "Regular,Bold" |
| 279 | + |
| 280 | +# または Docker コンテナ経由(ファミリー名 'Fira Code cv01 cv02 cv06 cv31 onum ss01 ss03 ss04 zero' を作成) |
| 281 | +docker run --rm -v "${PWD}":/opt tonsky/firacode:latest ./script/build.sh -f "cv01,cv02,cv06,ss01,zero,onum,ss03,ss04,cv31" -n "features" |
| 282 | + |
| 283 | +# Git for Windows の Git Bash やその他の MSYS2 ベースのシェルで使用する場合は、パス変換を無効にする必要があるかもしれません |
| 284 | +MSYS2_ARG_CONV_EXCL="*" docker run --rm -v "${PWD}":/opt tonsky/firacode:latest ./script/build.sh -f "ss02,ss03,ss04,ss05,ss06,ss07" |
| 285 | +``` |
| 286 | + |
| 287 | +### クレジット |
| 288 | + |
| 289 | +- 作者: Nikita Prokopov [@nikitonsky](https://twitter.com/nikitonsky) |
| 290 | +- 基にした: [Fira Mono](https://github.com/mozilla/Fira) |
| 291 | +- インスパイアされた: [Hasklig](https://github.com/i-tu/Hasklig) |
0 commit comments