<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd"> <HTML ><HEAD ><TITLE >FcFontSetSort</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK REL="HOME" HREF="t1.html"><LINK REL="UP" TITLE="FcFontSet" HREF="x102.html#AEN1003"><LINK REL="PREVIOUS" TITLE="FcFontSetPrint" HREF="fcfontsetprint.html"><LINK REL="NEXT" TITLE="FcFontSetSortDestroy" HREF="fcfontsetsortdestroy.html"></HEAD ><BODY CLASS="REFENTRY" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" ></TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="fcfontsetprint.html" ACCESSKEY="P" ><<< Previous</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="fcfontsetsortdestroy.html" ACCESSKEY="N" >Next >>></A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="FCFONTSETSORT" ></A >FcFontSetSort</H1 ><DIV CLASS="REFNAMEDIV" ><A NAME="AEN1155" ></A ><H2 >Name</H2 >FcFontSetSort -- Add to a font set</DIV ><DIV CLASS="REFSYNOPSISDIV" ><A NAME="AEN1158" ></A ><H2 >Synopsis</H2 ><DIV CLASS="FUNCSYNOPSIS" ><P ></P ><A NAME="AEN1159" ></A ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="FUNCSYNOPSISINFO" >#include <fontconfig/fontconfig.h> </PRE ></TD ></TR ></TABLE ><P ><CODE ><CODE CLASS="FUNCDEF" > <TT CLASS="FUNCTION" >FcFontSetSort</TT ></CODE >(FcConfig *<TT CLASS="PARAMETER" ><I >config</I ></TT >, FcFontSet **<TT CLASS="PARAMETER" ><I >sets</I ></TT >, int<TT CLASS="PARAMETER" ><I >nsets</I ></TT >, FcPattern *<TT CLASS="PARAMETER" ><I >pattern</I ></TT >, FcBool <TT CLASS="PARAMETER" ><I >trim</I ></TT >, FcCharSet **<TT CLASS="PARAMETER" ><I >csp</I ></TT >, FcResult *<TT CLASS="PARAMETER" ><I >result</I ></TT >);</CODE ></P ><P ></P ></DIV ></DIV ><DIV CLASS="REFSECT1" ><A NAME="AEN1178" ></A ><H2 >Description</H2 ><P >Returns the list of fonts from <TT CLASS="PARAMETER" ><I >sets</I ></TT > sorted by closeness to <TT CLASS="PARAMETER" ><I >pattern</I ></TT >. If <TT CLASS="PARAMETER" ><I >trim</I ></TT > is FcTrue, elements in the list which don't include Unicode coverage not provided by earlier elements in the list are elided. The union of Unicode coverage of all of the fonts is returned in <TT CLASS="PARAMETER" ><I >csp</I ></TT >, if <TT CLASS="PARAMETER" ><I >csp</I ></TT > is not NULL. This function should be called only after FcConfigSubstitute and FcDefaultSubstitute have been called for <TT CLASS="PARAMETER" ><I >p</I ></TT >; otherwise the results will not be correct. </P ><P >The returned FcFontSet references FcPattern structures which may be shared by the return value from multiple FcFontSort calls, applications cannot modify these patterns. Instead, they should be passed, along with <TT CLASS="PARAMETER" ><I >pattern</I ></TT > to <TT CLASS="FUNCTION" >FcFontRenderPrepare</TT > which combines them into a complete pattern. </P ><P >The FcFontSet returned by FcFontSetSort is destroyed by calling FcFontSetDestroy. </P ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="fcfontsetprint.html" ACCESSKEY="P" ><<< Previous</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="t1.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="fcfontsetsortdestroy.html" ACCESSKEY="N" >Next >>></A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >FcFontSetPrint</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="x102.html#AEN1003" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >FcFontSetSortDestroy</TD ></TR ></TABLE ></DIV ></BODY ></HTML >