LinuxCommandLibrary

fc-pattern

Show font matching pattern details

TLDR

Display default information about a font

$ fc-pattern [[-d|--default]] '[DejaVu Serif]'
copy

Display configuration information about a font
$ fc-pattern [[-c|--config]] '[DejaVu Serif]'
copy

SYNOPSIS

fc-pattern [pattern] [property...]

PARAMETERS

pattern
    A font pattern string that defines the desired font characteristics. If omitted, the command uses the default fontconfig pattern.

property...
    List of font properties to display. If omitted, all properties of the matching font are shown.

-v
    Verbose output format.

DESCRIPTION

The fc-pattern command allows users to examine and display the properties of a font matching a specified pattern. It's primarily used for debugging fontconfig configurations and understanding how font matching works on a system. You can provide a pattern that defines the desired font characteristics, and fc-pattern will output the properties of the first font that matches that pattern. The command helps determine the font name, font family, style, weight, slant, and other related parameters. It is a powerful tool for developers and advanced users who need fine-grained control over font selection and rendering. Using the command without any arguments provides the default fontconfig pattern.
The command can also output properties using the -v parameter which adds a verbose output.

EXAMPLES

fc-pattern: Displays all font properties based on the default fontconfig configuration.
fc-pattern "sans:style=Bold": Shows the properties of the first sans-serif font with a bold style.
fc-pattern : family style weight: Shows the family, style and weight based on the default fontconfig configuration

SEE ALSO

Copied to clipboard