1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<HTML
3><HEAD
4><TITLE
5>FcFontSort</TITLE
6><META
7NAME="GENERATOR"
8CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9REL="HOME"
10HREF="t1.html"><LINK
11REL="UP"
12TITLE="FcConfig"
13HREF="x103.html#AEN3038"><LINK
14REL="PREVIOUS"
15TITLE="FcFontMatch"
16HREF="fcfontmatch.html"><LINK
17REL="NEXT"
18TITLE="FcFontRenderPrepare"
19HREF="fcfontrenderprepare.html"></HEAD
20><BODY
21CLASS="REFENTRY"
22BGCOLOR="#FFFFFF"
23TEXT="#000000"
24LINK="#0000FF"
25VLINK="#840084"
26ALINK="#0000FF"
27><DIV
28CLASS="NAVHEADER"
29><TABLE
30SUMMARY="Header navigation table"
31WIDTH="100%"
32BORDER="0"
33CELLPADDING="0"
34CELLSPACING="0"
35><TR
36><TH
37COLSPAN="3"
38ALIGN="center"
39></TH
40></TR
41><TR
42><TD
43WIDTH="10%"
44ALIGN="left"
45VALIGN="bottom"
46><A
47HREF="fcfontmatch.html"
48ACCESSKEY="P"
49>&#60;&#60;&#60; Previous</A
50></TD
51><TD
52WIDTH="80%"
53ALIGN="center"
54VALIGN="bottom"
55></TD
56><TD
57WIDTH="10%"
58ALIGN="right"
59VALIGN="bottom"
60><A
61HREF="fcfontrenderprepare.html"
62ACCESSKEY="N"
63>Next &#62;&#62;&#62;</A
64></TD
65></TR
66></TABLE
67><HR
68ALIGN="LEFT"
69WIDTH="100%"></DIV
70><H1
71><A
72NAME="FCFONTSORT"
73></A
74>FcFontSort</H1
75><DIV
76CLASS="REFNAMEDIV"
77><A
78NAME="AEN3569"
79></A
80><H2
81>Name</H2
82>FcFontSort&nbsp;--&nbsp;Return list of matching fonts</DIV
83><DIV
84CLASS="REFSYNOPSISDIV"
85><A
86NAME="AEN3572"
87></A
88><H2
89>Synopsis</H2
90><DIV
91CLASS="FUNCSYNOPSIS"
92><P
93></P
94><A
95NAME="AEN3573"
96></A
97><TABLE
98BORDER="0"
99BGCOLOR="#E0E0E0"
100WIDTH="100%"
101><TR
102><TD
103><PRE
104CLASS="FUNCSYNOPSISINFO"
105>#include &#60;fontconfig/fontconfig.h&#62;
106        </PRE
107></TD
108></TR
109></TABLE
110><P
111><CODE
112><CODE
113CLASS="FUNCDEF"
114>FcFontSet * <TT
115CLASS="FUNCTION"
116>FcFontSort</TT
117></CODE
118>(FcConfig *<TT
119CLASS="PARAMETER"
120><I
121>config</I
122></TT
123>, FcPattern *<TT
124CLASS="PARAMETER"
125><I
126>p</I
127></TT
128>, FcBool <TT
129CLASS="PARAMETER"
130><I
131>trim</I
132></TT
133>, FcCharSet **<TT
134CLASS="PARAMETER"
135><I
136>csp</I
137></TT
138>, FcResult *<TT
139CLASS="PARAMETER"
140><I
141>result</I
142></TT
143>);</CODE
144></P
145><P
146></P
147></DIV
148></DIV
149><DIV
150CLASS="REFSECT1"
151><A
152NAME="AEN3588"
153></A
154><H2
155>Description</H2
156><P
157>Returns the list of fonts sorted by closeness to <TT
158CLASS="PARAMETER"
159><I
160>p</I
161></TT
162>.  If <TT
163CLASS="PARAMETER"
164><I
165>trim</I
166></TT
167> is FcTrue,
168elements in the list which don't include Unicode coverage not provided by
169earlier elements in the list are elided.  The union of Unicode coverage of
170all of the fonts is returned in <TT
171CLASS="PARAMETER"
172><I
173>csp</I
174></TT
175>, if <TT
176CLASS="PARAMETER"
177><I
178>csp</I
179></TT
180> is not NULL.  This function
181should be called only after FcConfigSubstitute and FcDefaultSubstitute have
182been called for <TT
183CLASS="PARAMETER"
184><I
185>p</I
186></TT
187>; otherwise the results will not be correct.
188    </P
189><P
190>The returned FcFontSet references FcPattern structures which may be shared
191by the return value from multiple FcFontSort calls, applications must not
192modify these patterns.  Instead, they should be passed, along with <TT
193CLASS="PARAMETER"
194><I
195>p</I
196></TT
197> to
198<TT
199CLASS="FUNCTION"
200>FcFontRenderPrepare</TT
201> which combines them into a complete pattern.
202    </P
203><P
204>The FcFontSet returned by FcFontSort is destroyed by calling FcFontSetDestroy.
205If <TT
206CLASS="PARAMETER"
207><I
208>config</I
209></TT
210> is NULL, the current configuration is used.
211            </P
212></DIV
213><DIV
214CLASS="NAVFOOTER"
215><HR
216ALIGN="LEFT"
217WIDTH="100%"><TABLE
218SUMMARY="Footer navigation table"
219WIDTH="100%"
220BORDER="0"
221CELLPADDING="0"
222CELLSPACING="0"
223><TR
224><TD
225WIDTH="33%"
226ALIGN="left"
227VALIGN="top"
228><A
229HREF="fcfontmatch.html"
230ACCESSKEY="P"
231>&#60;&#60;&#60; Previous</A
232></TD
233><TD
234WIDTH="34%"
235ALIGN="center"
236VALIGN="top"
237><A
238HREF="t1.html"
239ACCESSKEY="H"
240>Home</A
241></TD
242><TD
243WIDTH="33%"
244ALIGN="right"
245VALIGN="top"
246><A
247HREF="fcfontrenderprepare.html"
248ACCESSKEY="N"
249>Next &#62;&#62;&#62;</A
250></TD
251></TR
252><TR
253><TD
254WIDTH="33%"
255ALIGN="left"
256VALIGN="top"
257>FcFontMatch</TD
258><TD
259WIDTH="34%"
260ALIGN="center"
261VALIGN="top"
262><A
263HREF="x103.html#AEN3038"
264ACCESSKEY="U"
265>Up</A
266></TD
267><TD
268WIDTH="33%"
269ALIGN="right"
270VALIGN="top"
271>FcFontRenderPrepare</TD
272></TR
273></TABLE
274></DIV
275></BODY
276></HTML
277>