A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/linux-unix/fc-list-command-in-linux-with-examples/ below:

fc-list command in Linux with examples

fc-list command in Linux with examples

Last Updated : 10 Oct, 2024

fc-list command is a part of the fontconfig system. It is used to list the available fonts and font styles. Using the format option, the list of all fonts can be filtered and sorted out. Moreover, multiple parameters can be passed to it after a colon symbol (:) to restrict the information that is being displayed on the screen.

Syntax
fc-list [options] [pattern] {element ...}

The fc-list command lists fonts matching the specified pattern and element. If no pattern or element is provided, it lists all fonts installed on the system.

Basic Example

It will print all the file locations of the font files present in the system, with their font name, spacing, and style type.

fc-list
Key Options for the fc-list Command Option Description -v, --verbose Displays the entire font pattern verbosely, showing detailed information about each font. -f, --format=FORMAT Customizes the output using the specified format. -q, --quiet Suppresses all normal output, but returns exit status 1 if no fonts match the pattern. -V, --version Displays the version of fontconfig being used, then exits. -h, --help Shows the help message for the fc-list command, providing information on available options. Common Use Cases and Examples 1. fc-list with font-family

It will print only the names of the font families, without displaying the other aforementioned details.

fc-list : family 
2. fc-list with font family + Language selector

It will print only the names of the font families which support the selected language code, without displaying the other aforementioned details.

Note: The language code used here is "ta", which stands for the language Tamil.

fc-list : family lang=ta 

Note: The language code used here is "hi", which stands for the language Hindi.

fc-list : family lang=hi
3. fc-list with other selectors

Similar to the family selector, we can also select the file location, spacing or/and style of the required fonts to be displayed onscreen.

fc-list : family style 

Note: Sorting and unique can also be incorporated along with this command

fc-list : family spacing | sort | uniq
4. fc-list with format option

This option is used to format the output text to the required pattern given by the user. In this example, the format option is used to get the family names of all the fonts, sorted and unique.

fc-list --format="%{family[0]}\n" | sort | uniq
Conclusion

The fc-list command is a powerful tool for listing and managing fonts on Linux. If you need to view all available fonts, filter them by family or language, or format the output for further analysis, fc-list offers a range of options and functions to meet your needs. By mastering the fc-list command, you'll have better control over the fonts installed on your Linux system, making it easier to work with typography, design, and multi-lingual text.



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4