fc-list 命令详解

| 选择喜欢的代码风格  

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

fc-list 命令安装:


-bash/zsh: fc-list command not found

#Debian
apt-get install fontconfig

#Ubuntu
apt-get install fontconfig

#Alpine
apk add fontconfig

#Arch Linux
pacman -S fontconfig

#Kali Linux
apt-get install fontconfig

#CentOS
yum install fontconfig

#Fedora
dnf install fontconfig

#OS X
brew install fontconfig

#Raspbian
apt-get install fontconfig

#Docker
docker run cmd.cat/fc-list fc-list

fc-list 命令补充说明:


Fontconfig 是用于配置和自定义字体访问的库。

fc-list 列出了使用 fontconfig 的应用程序在系统上可用的字体和样式。如果指定了任何元素,则只有那些打印。否则,除非要求详细输出,否则将打印系列和样式。

Fontconfig 可以:

  • 自动安装时发现新字体,从而消除了常见的配置问题。
  • 执行字体名称替换,以便在缺少字体时可以选择适当的替代字体。
  • 确定完全覆盖一组语言所需的一组字体。
  • 由于使用基于 XML 的配置文件而构建了 GUI 配置工具(尽管具有自动发现功能,但我们认为这一需求已降至最低)。
  • 即使已安装了数千种字体,也可以在减少内存使用的同时,高效,快速地在已安装的字体集中找到所需的字体。
  • X Render ExtensionFreeType 配合使用,可在显示器上实现高质量,抗锯齿和亚像素渲染的文本。

Fontconfig 不会:

  • 自己渲染字体(留给 FreeType 或其他渲染机制)
  • 以任何方式依赖于 X Window 系统,因此仅打印机应用程序不具有此类依赖关系

fc-list 命令语法:


fc-list [ -vVh ]  [ --verbose ] [  [ -f format ]  [ --format format ]  ]  [  [ -q ]  [ --quiet ]  ]  [ --version ]  [ --help ]
        [ pattern  [ element... ]   ]

fc-list 命令选项:


-v     Print verbose output of the whole font pattern for each match, or elements if any is provided.

-f     Format output according to the format specifier format.

-q     Suppress all normal output. returns 1 as the error code if no fonts matched.

-V     Show version of the program and exit.

-h     Show summary of options.

pattern
If this argument is set, only fonts matching pattern are displayed.

element
If set, the element property is displayed for matching fonts.

fc-list 命令参数:


目标文件

fc-list 命令实例:


fc-list 列出所有字体:

fc-list

/usr/share/fonts/dejavu/DejaVuSansCondensed-Oblique.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Oblique,Oblique
/usr/share/fonts/dejavu/DejaVuSansCondensed-Bold.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold,Bold
/usr/share/fonts/dejavu/DejaVuSans.ttf: DejaVu Sans:style=Book
/usr/share/fonts/dejavu/DejaVuSans-Bold.ttf: DejaVu Sans:style=Bold
/usr/share/fonts/dejavu/DejaVuSansCondensed.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed,Book
/usr/share/fonts/dejavu/DejaVuSans-ExtraLight.ttf: DejaVu Sans,DejaVu Sans Light:style=ExtraLight
/usr/share/fonts/dejavu/DejaVuSansCondensed-BoldOblique.ttf: DejaVu Sans,DejaVu Sans Condensed:style=Condensed Bold Oblique,Bold Oblique
/usr/share/fonts/dejavu/DejaVuSans-Oblique.ttf: DejaVu Sans:style=Oblique
/usr/share/fonts/dejavu/DejaVuSans-BoldOblique.ttf: DejaVu Sans:style=Bold Oblique

fc-list 返回具有给定名称的已安装字体的列表:

fc-list | grep 'DejaVu Serif'

fc-list 命令扩展阅读:




fc-list 命令评论

共收录到 489Linux 命令