---
name: "FcFontSetMatch"
section: "3"
platform: "linux"
package: "fontconfig"
version: "2:2.18.3-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/FcFontSetMatch"
---

# FcFontSetMatch(3)

Return the best font from a set of font sets

## NAME

FcFontSetMatch - Return the best font from a set of font sets

## SYNOPSIS

**#include \<fontconfig/fontconfig.h\>**

**FcPattern \* FcFontSetMatch (FcConfig \****config***, FcFontSet \*\****sets***, int** *nsets***, FcPattern \****pattern***, FcResult \****result***);**

## DESCRIPTION

Finds the font in *sets* most closely matching *pattern* and returns the result of **FcFontRenderPrepare** for that font and the provided pattern. This function should be called only after **FcConfigSubstitute** and **FcDefaultSubstitute** have been called for *pattern*; otherwise the results will not be correct. If *config* is NULL, the current configuration is used. Returns NULL if an error occurs during this process.
