Imported Upstream version 2.14.2
[platform/upstream/fontconfig.git] / doc / FcFontSort.3
1 .\" auto-generated by docbook2man-spec from docbook-utils package
2 .TH "FcFontSort" "3" "27 1月 2023" "Fontconfig 2.14.2" ""
3 .SH NAME
4 FcFontSort \- Return list of matching fonts
5 .SH SYNOPSIS
6 .nf
7 \fB#include <fontconfig/fontconfig.h>
8 .sp
9 FcFontSet * FcFontSort (FcConfig *\fIconfig\fB, FcPattern *\fIp\fB, FcBool \fItrim\fB, FcCharSet **\fIcsp\fB, FcResult *\fIresult\fB);
10 .fi\fR
11 .SH "DESCRIPTION"
12 .PP
13 Returns the list of fonts sorted by closeness to \fIp\fR\&. If \fItrim\fR is FcTrue,
14 elements in the list which don't include Unicode coverage not provided by
15 earlier elements in the list are elided. The union of Unicode coverage of
16 all of the fonts is returned in \fIcsp\fR, if \fIcsp\fR is not NULL. This function
17 should be called only after FcConfigSubstitute and FcDefaultSubstitute have
18 been called for \fIp\fR; otherwise the results will not be correct.
19 .PP
20 The returned FcFontSet references FcPattern structures which may be shared
21 by the return value from multiple FcFontSort calls, applications must not
22 modify these patterns. Instead, they should be passed, along with \fIp\fR to
23 \fBFcFontRenderPrepare\fR which combines them into a complete pattern.
24 .PP
25 The FcFontSet returned by FcFontSort is destroyed by calling FcFontSetDestroy.
26 If \fIconfig\fR is NULL, the current configuration is used.