Imported Upstream version 2.14.2
[platform/upstream/fontconfig.git] / doc / FcPatternBuild.3
1 .\" auto-generated by docbook2man-spec from docbook-utils package
2 .TH "FcPatternBuild" "3" "27 1月 2023" "Fontconfig 2.14.2" ""
3 .SH NAME
4 FcPatternBuild, FcPatternVaBuild, FcPatternVapBuild \- Create patterns from arguments
5 .SH SYNOPSIS
6 .nf
7 \fB#include <fontconfig/fontconfig.h>
8 .sp
9 FcPattern * FcPatternBuild (FcPattern *\fIpattern\fB, \&...\fI\fB);
10 .sp
11 FcPattern * FcPatternVaBuild (FcPattern *\fIpattern\fB, va_list \fIva\fB);
12 .sp
13 void FcPatternVapBuild (FcPattern *\fIresult\fB, FcPattern *\fIpattern\fB, va_list \fIva\fB);
14 .fi\fR
15 .SH "DESCRIPTION"
16 .PP
17 Builds a pattern using a list of objects, types and values. Each
18 value to be entered in the pattern is specified with three arguments:
19 .IP 1. 
20 Object name, a string describing the property to be added.
21 .IP 2. 
22 Object type, one of the FcType enumerated values
23 .IP 3. 
24 Value, not an FcValue, but the raw type as passed to any of the
25 FcPatternAdd<type> functions. Must match the type of the second
26 argument.
27 .PP
28 The argument list is terminated by a null object name, no object type nor
29 value need be passed for this. The values are added to `pattern', if
30 `pattern' is null, a new pattern is created. In either case, the pattern is
31 returned. Example
32 .PP
33 .sp
34 .nf
35 pattern = FcPatternBuild (0, FC_FAMILY, FcTypeString, "Times", (char *) 0);
36 .sp
37 .fi
38 .PP
39 FcPatternVaBuild is used when the arguments are already in the form of a
40 varargs value. FcPatternVapBuild is a macro version of FcPatternVaBuild
41 which returns its result directly in the \fIresult\fR
42 variable.
43 .PP