両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
linux:fonts [2022/07/29 10:40] – [インストール] ともやん | linux:fonts [2023/09/06 15:20] (現在) – [フォントのダウンロード] ともやん |
---|
====== フォント ====== | ====== フォント ====== |
| [[:open_source:fonts|フォント]] (オープンソース) も参照🤤\\ |
| |
===== Linux でのフォントのインストール ===== | ===== Linux でのフォントのインストール ===== |
==== フォントのダウンロード ==== | ==== フォントのダウンロード ==== |
<WRAP color_term> | <WRAP color_term> |
<WRAP color_command><code> | <WRAP color_command><html><pre> |
$ curl -LO https://github.com/yuru7/HackGen/releases/download/v2.6.3/HackGenNerd_v2.6.3.zip | <b class=GRN>$</b> <b class=HIY>curl</b> <b class=HIK>-LO</b> https://github.com/yuru7/HackGen/releases/download/v2.9.0/HackGen_NF_v2.9.0.zip |
</code></WRAP> | </pre></html></WRAP> |
<WRAP color_result><code> | <WRAP color_result><html><pre> |
% Total % Received % Xferd Average Speed Time Time Time Current | % Total % Received % Xferd Average Speed Time Time Time Current |
Dload Upload Total Spent Left Speed | Dload Upload Total Spent Left Speed |
100 661 100 661 0 0 1163 0 --:--:-- --:--:-- --:--:-- 1165 | 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 |
100 42.0M 100 42.0M 0 0 772k 0 0:00:55 0:00:55 --:--:-- 465k | 100 23.0M 100 23.0M 0 0 2776k 0 0:00:08 0:00:08 --:--:-- 3416k |
</code></WRAP> | </pre></html></WRAP> |
| <WRAP color_command><html><pre> |
| <b class=GRN>$</b> <b class=HIY>curl</b> <b class=HIK>-LO</b> https://github.com/yuru7/HackGen/releases/download/v2.9.0/HackGen_v2.9.0.zip |
| </pre></html></WRAP> |
| <WRAP color_result><html><pre> |
| % Total % Received % Xferd Average Speed Time Time Time Current |
| Dload Upload Total Spent Left Speed |
| 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 |
| 100 38.5M 100 38.5M 0 0 3173k 0 0:00:12 0:00:12 --:--:-- 4180k |
| </pre></html></WRAP> |
| |
<WRAP color_command><code> | <WRAP color_command><html><pre> |
$ unzip HackGenNerd_v2.6.3.zip | <b class=GRN>$</b> <b class=HIY>unzip</b> HackGen_NF_v2.9.0.zip |
</code></WRAP> | </pre></html></WRAP> |
<WRAP color_result><code> | <WRAP color_result><html><pre> |
Archive: HackGenNerd_v2.6.3.zip | Archive: HackGen_NF_v2.9.0.zip |
creating: HackGenNerd_v2.6.3/ | creating: HackGen_NF_v2.9.0/ |
inflating: HackGenNerd_v2.6.3/HackGen35Nerd-Bold.ttf | inflating: HackGen_NF_v2.9.0/HackGen35ConsoleNF-Bold.ttf |
inflating: HackGenNerd_v2.6.3/HackGen35Nerd-Regular.ttf | inflating: HackGen_NF_v2.9.0/HackGen35ConsoleNF-Regular.ttf |
inflating: HackGenNerd_v2.6.3/HackGen35NerdConsole-Bold.ttf | inflating: HackGen_NF_v2.9.0/HackGenConsoleNF-Bold.ttf |
inflating: HackGenNerd_v2.6.3/HackGen35NerdConsole-Regular.ttf | inflating: HackGen_NF_v2.9.0/HackGenConsoleNF-Regular.ttf |
inflating: HackGenNerd_v2.6.3/HackGenNerd-Bold.ttf | </pre></html></WRAP> |
inflating: HackGenNerd_v2.6.3/HackGenNerd-Regular.ttf | <WRAP color_command><html><pre> |
inflating: HackGenNerd_v2.6.3/HackGenNerdConsole-Bold.ttf | <b class=GRN>$</b> <b class=HIY>unzip</b> HackGen_v2.9.0.zip |
inflating: HackGenNerd_v2.6.3/HackGenNerdConsole-Regular.ttf | </pre></html></WRAP> |
</code></WRAP> | <WRAP color_result><html><pre> |
| Archive: HackGen_v2.9.0.zip |
| creating: HackGen_v2.9.0/ |
| inflating: HackGen_v2.9.0/HackGen-Bold.ttf |
| inflating: HackGen_v2.9.0/HackGen-Regular.ttf |
| inflating: HackGen_v2.9.0/HackGen35-Bold.ttf |
| inflating: HackGen_v2.9.0/HackGen35-Regular.ttf |
| inflating: HackGen_v2.9.0/HackGen35Console-Bold.ttf |
| inflating: HackGen_v2.9.0/HackGen35Console-Regular.ttf |
| inflating: HackGen_v2.9.0/HackGenConsole-Bold.ttf |
| inflating: HackGen_v2.9.0/HackGenConsole-Regular.ttf |
| </pre></html></WRAP> |
</WRAP> | </WRAP> |
| |
==== インストール先確認 ==== | ==== インストール先確認 (フォントパス) ==== |
| 殆どの Linux ディストリビューションでは、Fontconfig が利用するフォントパスは <html><code>/usr/share/fonts/</code></html> や <html><code>~/.local/share/fonts</code></html> です🤔\\ |
| <WRAP mintbl> |
| ^ フォントパス ^ 補足 ^ |
| | /usr/share/fonts/ | OS のフォントインストール先 | |
| | /usr/local/share/fonts | システム管理者のフォントインストール先 | |
| | ~/.local/share/fonts | ユーザーのフォントインストール先 | |
| | ~/.fonts | 非推奨 | |
| </WRAP> |
| [[https://wiki.archlinux.jp/index.php/%E3%83%95%E3%82%A9%E3%83%B3%E3%83%88%E8%A8%AD%E5%AE%9A|フォント設定 - ArchWiki]]\\ |
| |
| **Fedora**\\ |
<WRAP color_term> | <WRAP color_term> |
<WRAP color_command><code> | <WRAP color_command><html><pre> |
$ cat /etc/fonts/fonts.conf | <b class=GRN>$</b> <b class=HIY>cat</b> /etc/fonts/fonts.conf |
| </pre></html></WRAP> |
| <WRAP color_result_long><code xml> |
| <?xml version="1.0"?> |
| <!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd"> |
| <!-- /etc/fonts/fonts.conf file to configure system font access --> |
| <fontconfig> |
| <description>Default configuration file</description> |
| |
| <!-- |
| DO NOT EDIT THIS FILE. |
| IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED. |
| LOCAL CHANGES BELONG IN 'local.conf'. |
| |
| The intent of this standard configuration file is to be adequate for |
| most environments. If you have a reasonably normal environment and |
| have found problems with this configuration, they are probably |
| things that others will also want fixed. Please submit any problems |
| to the fontconfig issue tracking system located at fontconfig.org |
| |
| Note that the normal 'make install' procedure for fontconfig is to |
| replace any existing fonts.conf file with the new version. Place |
| any local customizations in local.conf which this file references. |
| |
| Keith Packard |
| --> |
| |
| <!-- Font directory list --> |
| |
| <dir>/usr/share/fonts</dir> |
| <dir>/usr/share/X11/fonts/Type1</dir> <dir>/usr/share/X11/fonts/TTF</dir> <dir>/usr/local/share/fonts</dir> |
| <dir prefix="xdg">fonts</dir> |
| <!-- the following element will be removed in the future --> |
| <dir>~/.fonts</dir> |
| |
| <!-- |
| Accept deprecated 'mono' alias, replacing it with 'monospace' |
| --> |
| <match target="pattern"> |
| <test qual="any" name="family"> |
| <string>mono</string> |
| </test> |
| <edit name="family" mode="assign" binding="same"> |
| <string>monospace</string> |
| </edit> |
| </match> |
| |
| <!-- |
| Accept alternate 'sans serif' spelling, replacing it with 'sans-serif' |
| --> |
| <match target="pattern"> |
| <test qual="any" name="family"> |
| <string>sans serif</string> |
| </test> |
| <edit name="family" mode="assign" binding="same"> |
| <string>sans-serif</string> |
| </edit> |
| </match> |
| |
| <!-- |
| Accept deprecated 'sans' alias, replacing it with 'sans-serif' |
| --> |
| <match target="pattern"> |
| <test qual="any" name="family"> |
| <string>sans</string> |
| </test> |
| <edit name="family" mode="assign" binding="same"> |
| <string>sans-serif</string> |
| </edit> |
| </match> |
| <!-- |
| Accept alternate 'system ui' spelling, replacing it with 'system-ui' |
| --> |
| <match target="pattern"> |
| <test qual="any" name="family"> |
| <string>system ui</string> |
| </test> |
| <edit name="family" mode="assign" binding="same"> |
| <string>system-ui</string> |
| </edit> |
| </match> |
| |
| <!-- |
| Load local system customization file |
| --> |
| <include ignore_missing="yes">conf.d</include> |
| |
| <!-- Font cache directory list --> |
| |
| <cachedir>/usr/lib/fontconfig/cache</cachedir> |
| <cachedir prefix="xdg">fontconfig</cachedir> |
| <!-- the following element will be removed in the future --> |
| <cachedir>~/.fontconfig</cachedir> |
| |
| <config> |
| <!-- |
| Rescan configuration every 30 seconds when FcFontSetList is called |
| --> |
| <rescan> |
| <int>30</int> |
| </rescan> |
| </config> |
| |
| </fontconfig> |
</code></WRAP> | </code></WRAP> |
| </WRAP> |
| |
| **DietPi**\\ |
| <WRAP color_term> |
| <WRAP color_command><html><pre> |
| <b class=GRN>$</b> <b class=HIY>cat</b> /etc/fonts/fonts.conf |
| </pre></html></WRAP> |
<WRAP color_result_long><code xml> | <WRAP color_result_long><code xml> |
<?xml version="1.0"?> | <?xml version="1.0"?> |
===== インストール ===== | ===== インストール ===== |
<WRAP color_term> | <WRAP color_term> |
<WRAP color_command><code> | <WRAP color_command><html><pre> |
$ mkdir ~/.local/share/fonts | <b class=GRN>$</b> <b class=HIY>mkdir</b> ~/.local/share/fonts |
$ mv HackGenNerd_v2.6.3/* ~/.local/share/fonts/ | <b class=GRN>$</b> <b class=HIY>mv</b> HackGen_NF_v2.9.0/*.ttf ~/.local/share/fonts/ |
$ fc-list | grep HackGen | <b class=GRN>$</b> <b class=HIY>mv</b> HackGen_v2.9.0/*.ttf ~/.local/share/fonts/ |
</code></WRAP> | <b class=GRN>$</b> <b class=HIY>fc-list</b> | <b class=HIY>grep</b> HackGen |
<WRAP color_result><html><pre> | |
/home/dietpi/.local/share/fonts/<b class=RED>HackGen</b>35NerdConsole-Bold.ttf: <b class=RED>HackGen</b>35Nerd Console:style=Bold | |
/home/dietpi/.local/share/fonts/<b class=RED>HackGen</b>35Nerd-Regular.ttf: <b class=RED>HackGen</b>35Nerd:style=Regular | |
/home/dietpi/.local/share/fonts/<b class=RED>HackGen</b>35NerdConsole-Regular.ttf: <b class=RED>HackGen</b>35Nerd Console:style=Regular | |
/home/dietpi/.local/share/fonts/<b class=RED>HackGen</b>NerdConsole-Regular.ttf: <b class=RED>HackGen</b>Nerd Console:style=Regular | |
/home/dietpi/.local/share/fonts/<b class=RED>HackGen</b>Nerd-Bold.ttf: <b class=RED>HackGen</b>Nerd:style=Bold | |
/home/dietpi/.local/share/fonts/<b class=RED>HackGen</b>Nerd-Regular.ttf: <b class=RED>HackGen</b>Nerd:style=Regular | |
/home/dietpi/.local/share/fonts/<b class=RED>HackGen</b>NerdConsole-Bold.ttf: <b class=RED>HackGen</b>Nerd Console:style=Bold | |
/home/dietpi/.local/share/fonts/<b class=RED>HackGen</b>35Nerd-Bold.ttf: <b class=RED>HackGen</b>35Nerd:style=Bold | |
</pre></html></WRAP> | </pre></html></WRAP> |
| <WRAP color_result><html><pre> |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>Console-Bold.ttf: <b class=RED>HackGen</b> Console:style=Bold |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>ConsoleNF-Regular.ttf: <b class=RED>HackGen</b> Console NF:style=Regular |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>35ConsoleNF-Regular.ttf: <b class=RED>HackGen</b>35 Console NF:style=Regular |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>35ConsoleNFJ-Regular.ttf: <b class=RED>HackGen</b>35 Console NFJ:style=Regular |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>-Bold.ttf: <b class=RED>HackGen</b>:style=Bold |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>35-Bold.ttf: <b class=RED>HackGen</b>35:style=Bold |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>Console-Regular.ttf: <b class=RED>HackGen</b> Console:style=Regular |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>35ConsoleNF-Bold.ttf: <b class=RED>HackGen</b>35 Console NF:style=Bold |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>ConsoleNFJ-Regular.ttf: <b class=RED>HackGen</b> Console NFJ:style=Regular |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>35Console-Bold.ttf: <b class=RED>HackGen</b>35 Console:style=Bold |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>35Console-Regular.ttf: <b class=RED>HackGen</b>35 Console:style=Regular |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>-Regular.ttf: <b class=RED>HackGen</b>:style=Regular |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>35-Regular.ttf: <b class=RED>HackGen</b>35:style=Regular |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>35ConsoleNFJ-Bold.ttf: <b class=RED>HackGen</b>35 Console NFJ:style=Bold |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>ConsoleNF-Bold.ttf: <b class=RED>HackGen</b> Console NF:style=Bold |
| /home/tomoyan/.local/share/fonts/<b class=RED>HackGen</b>ConsoleNFJ-Bold.ttf: <b class=RED>HackGen</b> Console NFJ:style=Bold</pre></html></WRAP> |
</WRAP> | </WRAP> |
※**fc-list** は **fontconfig** パッケージに含まれている🤔\\ <WRAP color_term> | ※**fc-list** は **fontconfig** パッケージに含まれている🤔\\ <WRAP color_term> |
<WRAP color_command><code> | <WRAP color_command><html><pre> |
$ sudo apt install fontconfig | <b class=GRN>$</b> <b class=HIY>sudo</b> apt install fontconfig |
</code></WRAP> | </pre></html></WRAP> |
</WRAP> | </WRAP> |
| |