fc-pattern
The fc-pattern
command line tool is a utility provided in the Fontconfig library. Fontconfig is a font configuration and customization library used in Linux and Unix-like systems to manage and organize fonts.
The fc-pattern
command allows you to query and display font patterns and properties. It provides information about various attributes of the available fonts, such as family name, style, weight, size, and more. You can use fc-pattern
to explore the characteristics of fonts installed on your system or to search for specific font properties.
Here are a few examples of how you can use fc-pattern
:
-
Display a list of all available font families:
fc-pattern -l
-
Find fonts matching a specific pattern:
fc-pattern "family=Arial" "style=Italic"
-
Determine the default font for a particular language:
fc-pattern "lang=ja" "file=/usr/share/fonts/truetype/noto/NotoSansCJK-Regular.ttc"
The output of fc-pattern
provides detailed information about the selected fonts, including their file paths and properties. It can be useful for debugging font configurations, setting font preferences in desktop environments, or integrating font selection in scripts.
List of commands for fc-pattern:
-
fc-pattern:tldr:0b4a4 fc-pattern: Display default information about a font.$ fc-pattern --default '${DejaVu Serif}'try on your machineexplain this command
-
fc-pattern:tldr:a156a fc-pattern: Display config information about a font.$ fc-pattern --config '${DejaVu Serif}'try on your machineexplain this command