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