linux中查找所有已安装的字体

【Linux常用命令速查手册】关注【入门小站】,后台回复 「1001」 自取。

介绍

有一种快速的方法可以在你的 Linux 中找到所有已安装的字体。

在本文中,我们将使用fc-list命令列出Linux 系统上的所有字体和样式。

列出所有字体

  • 要列出 Linux 系统上所有已安装的字体,请运行以下命令
  1. > fc-list
  2. /usr/share/fonts/urw-base35/NimbusMonoPS-Italic.otf: Nimbus Mono PS:style=Italic
  3. /usr/share/fonts/urw-base35/D050000L.t1: D050000L:style=Regular
  4. /usr/share/fonts/urw-base35/NimbusSansNarrow-Regular.t1: Nimbus Sans Narrow:style=Regular
  5. /usr/share/fonts/urw-base35/NimbusSansNarrow-BoldOblique.t1: Nimbus Sans Narrow:style=Bold Oblique
  6. /usr/share/fonts/urw-base35/NimbusMonoPS-Bold.otf: Nimbus Mono PS:style=Bold
  7. /usr/share/fonts/urw-base35/P052-Roman.otf: P052:style=Roman
  8. /usr/share/fonts/urw-base35/P052-Italic.t1: P052:style=Italic
  9. /usr/share/fonts/dejavu/DejaVuSansCondensed-Oblique.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique
  10. /usr/share/fonts/urw-base35/C059-BdIta.otf: C059:style=Bold Italic
  11. /usr/share/fonts/dejavu/DejaVuSansCondensed-Bold.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold,Bold
  12. /usr/share/fonts/urw-base35/StandardSymbolsPS.t1: Standard Symbols PS:style=Regular
  13. /usr/share/fonts/urw-base35/URWBookman-DemiItalic.t1: URW Bookman:style=Demi Italic
  14. /usr/share/fonts/urw-base35/C059-Roman.t1: C059:style=Roman
  15. /usr/share/fonts/urw-base35/NimbusRoman-Italic.t1: Nimbus Roman:style=Italic
  16. /usr/share/fonts/urw-base35/C059-BdIta.t1: C059:style=Bold Italic
  17. /usr/share/fonts/urw-base35/URWBookman-LightItalic.otf: URW Bookman:style=Light Italic
  18. /usr/share/fonts/urw-base35/URWGothic-DemiOblique.otf: URW Gothic:style=Demi Oblique
  19. /usr/share/fonts/urw-base35/NimbusSansNarrow-BoldOblique.otf: Nimbus Sans Narrow:style=Bold Oblique
  20. /usr/share/fonts/urw-base35/NimbusSans-Bold.otf: Nimbus Sans:style=Bold
  21. /usr/share/fonts/urw-base35/NimbusRoman-Bold.otf: Nimbus Roman:style=Bold
  22. /usr/share/fonts/urw-base35/D050000L.otf: D050000L:style=Regular
  23. /usr/share/fonts/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book
  24. /usr/share/fonts/urw-base35/Z003-MediumItalic.otf: Z003:style=Medium Italic
  25. /usr/share/fonts/urw-base35/NimbusSans-Italic.otf: Nimbus Sans:style=Italic
  26. /usr/share/fonts/urw-base35/NimbusSans-Bold.t1: Nimbus Sans:style=Bold
  27. /usr/share/fonts/urw-base35/URWGothic-Demi.t1: URW Gothic:style=Demi
  28. /usr/share/fonts/urw-base35/NimbusRoman-BoldItalic.otf: Nimbus Roman:style=Bold Italic
  29. /usr/share/fonts/urw-base35/NimbusRoman-Italic.otf: Nimbus Roman:style=Italic
  30. /usr/share/fonts/urw-base35/C059-Roman.otf: C059:style=Roman
  31. /usr/share/fonts/urw-base35/C059-Italic.otf: C059:style=Italic
  32. /usr/share/fonts/urw-base35/NimbusSansNarrow-Oblique.otf: Nimbus Sans Narrow:style=Oblique
  33. /usr/share/fonts/urw-base35/NimbusSans-Regular.t1: Nimbus Sans:style=Regular
  34. /usr/share/fonts/urw-base35/P052-Bold.otf: P052:style=Bold
  35. ...
  • 要列出特定字体,例如,我们想知道是否安装了Italic字体,因此运行以下命令:
  1. fc-list | grep "Italic"
  2. /usr/share/fonts/urw-base35/NimbusMonoPS-Italic.otf: Nimbus Mono PS:style=Italic
  3. /usr/share/fonts/urw-base35/P052-Italic.t1: P052:style=Italic
  4. /usr/share/fonts/urw-base35/C059-BdIta.otf: C059:style=Bold Italic
  5. /usr/share/fonts/urw-base35/URWBookman-DemiItalic.t1: URW Bookman:style=Demi Italic
  6. /usr/share/fonts/urw-base35/NimbusRoman-Italic.t1: Nimbus Roman:style=Italic
  7. /usr/share/fonts/urw-base35/C059-BdIta.t1: C059:style=Bold Italic
  8. /usr/share/fonts/urw-base35/URWBookman-LightItalic.otf: URW Bookman:style=Light Italic
  9. /usr/share/fonts/urw-base35/Z003-MediumItalic.otf: Z003:style=Medium Italic
  10. /usr/share/fonts/urw-base35/NimbusSans-Italic.otf: Nimbus Sans:style=Italic
  11. /usr/share/fonts/urw-base35/NimbusRoman-BoldItalic.otf: Nimbus Roman:style=Bold Italic
  12. /usr/share/fonts/urw-base35/NimbusRoman-Italic.otf: Nimbus Roman:style=Italic
  13. /usr/share/fonts/urw-base35/C059-Italic.otf: C059:style=Italic
  14. ...
  • 使用find命令列出系统中的所有 truetype 字体。
  1. > find /usr/share/fonts/ -type f -name "*.ttf"
  2. /usr/share/fonts/dejavu/DejaVuSans.ttf
  3. /usr/share/fonts/dejavu/DejaVuSans-Bold.ttf
  4. /usr/share/fonts/dejavu/DejaVuSansCondensed-BoldOblique.ttf
  5. /usr/share/fonts/dejavu/DejaVuSansCondensed-Bold.ttf
  6. /usr/share/fonts/dejavu/DejaVuSansCondensed-Oblique.ttf
  7. /usr/share/fonts/dejavu/DejaVuSansCondensed.ttf
  8. /usr/share/fonts/dejavu/DejaVuSans-BoldOblique.ttf
  9. /usr/share/fonts/dejavu/DejaVuSans-Oblique.ttf
  10. /usr/share/fonts/dejavu/DejaVuSans-ExtraLight.ttf
  • 列出特定语言的所有已安装字体,例如通过运行列出阿拉伯语的字体:
  1. > fc-list :lang=ar
  2. /usr/share/fonts/dejavu/DejaVuSansCondensed-Bold.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold,Bold
  3. /usr/share/fonts/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book
  4. /usr/share/fonts/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold
  5. /usr/share/fonts/dejavu/DejaVuSansCondensed.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed,Book
  • 同样要列出已安装的阿拉伯字体,只需运行:
  1. > fc-list -f '%{file}\n' :lang=ar
  • 有关 fc-list 命令的更多信息,请看帮助:
  1. man fc-list

【Linux常用命令速查手册】关注【入门小站】,后台回复 「1001」 自取。

返回笔记列表
入门小站