linux:fonts

文書の過去の版を表示しています。


フォント

ここでは、HackGen をインストールする。

$ curl -LO https://github.com/yuru7/HackGen/releases/download/v2.6.3/HackGenNerd_v2.6.3.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   661  100   661    0     0   1163      0 --:--:-- --:--:-- --:--:--  1165
100 42.0M  100 42.0M    0     0   772k      0  0:00:55  0:00:55 --:--:--  465k
$ unzip HackGenNerd_v2.6.3.zip
Archive:  HackGenNerd_v2.6.3.zip
   creating: HackGenNerd_v2.6.3/
  inflating: HackGenNerd_v2.6.3/HackGen35Nerd-Bold.ttf
  inflating: HackGenNerd_v2.6.3/HackGen35Nerd-Regular.ttf
  inflating: HackGenNerd_v2.6.3/HackGen35NerdConsole-Bold.ttf
  inflating: HackGenNerd_v2.6.3/HackGen35NerdConsole-Regular.ttf
  inflating: HackGenNerd_v2.6.3/HackGenNerd-Bold.ttf
  inflating: HackGenNerd_v2.6.3/HackGenNerd-Regular.ttf
  inflating: HackGenNerd_v2.6.3/HackGenNerdConsole-Bold.ttf
  inflating: HackGenNerd_v2.6.3/HackGenNerdConsole-Regular.ttf
$ cat /etc/fonts/fonts.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>
        <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
                <its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
        </its:rules>
 
        <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 bugzilla 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/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>
 
<!--
  Ignore dpkg temporary files created in fonts directories
-->
        <selectfont>
                <rejectfont>
                        <glob>*.dpkg-tmp</glob>
                </rejectfont>
        </selectfont>
        <selectfont>
                <rejectfont>
                        <glob>*.dpkg-new</glob>
                </rejectfont>
        </selectfont>
 
<!--
  Load local system customization file
-->
        <include ignore_missing="yes">conf.d</include>
 
<!-- Font cache directory list -->
 
        <cachedir>/var/cache/fontconfig</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>
$ mkdir ~/.local/share/fonts
$ mv HackGenNerd_v2.6.3/* ~/.local/share/fonts/
$ fc-list | grep HackGen

/home/dietpi/.local/share/fonts/HackGen35NerdConsole-Bold.ttf: HackGen35Nerd Console:style=Bold
/home/dietpi/.local/share/fonts/HackGen35Nerd-Regular.ttf: HackGen35Nerd:style=Regular
/home/dietpi/.local/share/fonts/HackGen35NerdConsole-Regular.ttf: HackGen35Nerd Console:style=Regular
/home/dietpi/.local/share/fonts/HackGenNerdConsole-Regular.ttf: HackGenNerd Console:style=Regular
/home/dietpi/.local/share/fonts/HackGenNerd-Bold.ttf: HackGenNerd:style=Bold
/home/dietpi/.local/share/fonts/HackGenNerd-Regular.ttf: HackGenNerd:style=Regular
/home/dietpi/.local/share/fonts/HackGenNerdConsole-Bold.ttf: HackGenNerd Console:style=Bold
/home/dietpi/.local/share/fonts/HackGen35Nerd-Bold.ttf: HackGen35Nerd:style=Bold

  • linux/fonts.1659057534.txt.gz
  • 最終更新: 2022/07/29 10:18
  • by ともやん