fc-list
命令可帮助您使用fontconfig列出系统上可用的所有字体和样式。fc-list
,我们还可以查明是否安装了特定语言字体。在这个简短的教程中,让我向您展示如何列出所有已安装的字体,以及如何在 Linux 和类 Unix 系统中列出特定语言的已安装字体。在 Linux 中从命令行查找所有已安装的字体
linuxmi@linuxmi:~/www.linuxmi.com$ fc-list
linuxmi@linuxmi:~/www.linuxmi.com$ fc-list
/usr/share/fonts/truetype/lato/Lato-Medium.ttf: Lato,Lato Medium:style=Medium,Regular
/usr/share/fonts/truetype/tlwg/TlwgTypo-Bold.ttf: Tlwg Typo:style=Bold
/usr/share/fonts/truetype/lato/Lato-SemiboldItalic.ttf: Lato,Lato Semibold:style=Semibold Italic,Italic
/usr/share/fonts/truetype/dejavu/DejaVuSerif-Bold.ttf: DejaVu Serif:style=Bold
/usr/share/fonts/truetype/arphic/uming.ttc: AR PL UMing TW MBE:style=Light
/usr/share/fonts/opentype/urw-base35/URWBookman-LightItalic.otf: URW Bookman:style=Light Italic
/usr/share/fonts/truetype/fonts-kalapi/Kalapi.ttf: Kalapi:style=Regular
/usr/share/fonts/truetype/fonts-gujr-extra/Rekha.ttf: Rekha:style=Medium
/usr/share/fonts/truetype/tlwg/TlwgTypewriter-BoldOblique.ttf: Tlwg Typewriter:style=Bold Oblique
/usr/share/fonts/opentype/urw-base35/URWBookman-Light.otf: URW Bookman:style=Light
[...]
linuxmi@linuxmi:~/www.linuxmi.com$ fc-list | grep 'DejaVu Sans'
linuxmi@linuxmi:~/www.linuxmi.com$ fc-list | grep 'DejaVu Sans'
/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book
/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold
/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold
find
命令。请注意,完成需要一些时间,具体取决于您的硬盘大小和系统上可用的字体数量。linuxmi@linuxmi:~/www.linuxmi.com$ sudo find / -type f -name '*.ttf'
fc-list
在您的系统上找不到,请安装fontconfig包。例如,要在 Ubuntu 及其衍生产品中安装 fontconfig,请运行:linuxmi@linuxmi:~/www.linuxmi.com$ sudo apt-get install fontconfig
查找特定语言的已安装字体
fc-list
命令还允许我们列出特定语言的已安装字体。fc-list
。linuxmi@linuxmi:~/www.linuxmi.com$ fc-list :lang=ta
linuxmi@linuxmi:~/www.linuxmi.com$ fc-list :lang=ta
/usr/share/fonts/truetype/samyak-fonts/Samyak-Tamil.ttf: Samyak Tamil:style=Regular
/usr/share/fonts/truetype/freefont/FreeSerif.ttf: FreeSerif:style=Regular,нормален,normal,obyčejné,Mittel,µεσαία,Normaali,Normál,Normale,Gemiddeld,odmiana zwykła,Обычный,Normálne,ปกติ,menengah,прямій,Navadno,vidējs,normalusis,عادی,vừa,Arrunta,सामान्य
/usr/share/fonts/truetype/lohit-tamil-classical/Lohit-Tamil-Classical.ttf: Lohit Tamil Classical:style=Regular
/usr/share/fonts/truetype/lohit-tamil/Lohit-Tamil.ttf: Lohit Tamil:style=Regular
linuxmi@linuxmi:~/www.linuxmi.com$ fc-list -f '%{file} ' :lang=ta
/usr/share/fonts/truetype/lohit-tamil-classical/Lohit-Tamil-Classical.ttf
/usr/share/fonts/truetype/lohit-tamil/Lohit-Tamil.ttf
/usr/share/fonts/truetype/freefont/FreeSerif.ttf
/usr/share/fonts/truetype/samyak-fonts/Samyak-Tamil.ttf
linuxmi@linuxmi:~/www.linuxmi.com$ man fc-list
结论
fc-list
在 Linux 和 Unix 系统中使用命令列出所有已安装的字体以及如何为特定语言列出已安装的字体。如您所见,在 Linux 系统上找到已安装的字体并不难。链接:https://www.linuxmi.com/linux-mingling-chazhao-ziti.html
文章为用户上传,仅供非商业浏览。发布者:Lomu,转转请注明出处: https://www.daogebangong.com/articles/detail/How%20to%20Find%20All%20Installed%20Fonts%20from%20the%20Command%20Line%20in%20Linux.html
评论列表(196条)
测试