Blame doc/fcfontset.fncs

Packit 352660
/*
Packit 352660
 * fontconfig/doc/fcfontset.fncs
Packit 352660
 *
Packit 352660
 * Copyright © 2003 Keith Packard
Packit 352660
 *
Packit 352660
 * Permission to use, copy, modify, distribute, and sell this software and its
Packit 352660
 * documentation for any purpose is hereby granted without fee, provided that
Packit 352660
 * the above copyright notice appear in all copies and that both that
Packit 352660
 * copyright notice and this permission notice appear in supporting
Packit 352660
 * documentation, and that the name of the author(s) not be used in
Packit 352660
 * advertising or publicity pertaining to distribution of the software without
Packit 352660
 * specific, written prior permission.  The authors make no
Packit 352660
 * representations about the suitability of this software for any purpose.  It
Packit 352660
 * is provided "as is" without express or implied warranty.
Packit 352660
 *
Packit 352660
 * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
Packit 352660
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
Packit 352660
 * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
Packit 352660
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
Packit 352660
 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
Packit 352660
 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
Packit 352660
 * PERFORMANCE OF THIS SOFTWARE.
Packit 352660
 */
Packit 352660
@RET@		FcFontSet *
Packit 352660
@FUNC@		FcFontSetCreate
Packit 352660
@TYPE1@		void
Packit 352660
@PURPOSE@	Create a font set
Packit 352660
@DESC@
Packit 352660
Creates an empty font set.
Packit 352660
@@
Packit 352660
Packit 352660
@RET@		void
Packit 352660
@FUNC@		FcFontSetDestroy
Packit 352660
@TYPE1@		FcFontSet *			@ARG1@		s
Packit 352660
@PURPOSE@	Destroy a font set
Packit 352660
@DESC@
Packit 352660
Destroys a font set.  Note that this destroys any referenced patterns as
Packit 352660
well.
Packit 352660
@@
Packit 352660
Packit 352660
@RET@		FcBool
Packit 352660
@FUNC@		FcFontSetAdd
Packit 352660
@TYPE1@		FcFontSet *			@ARG1@		s
Packit 352660
@TYPE2@		FcPattern *			@ARG2@		font
Packit 352660
@PURPOSE@	Add to a font set
Packit 352660
@DESC@
Packit 352660
Adds a pattern to a font set.  Note that the pattern is not copied before
Packit 352660
being inserted into the set. Returns FcFalse if the pattern cannot be
Packit 352660
inserted into the set (due to allocation failure). Otherwise returns FcTrue.
Packit 352660
@@
Packit 352660
Packit 352660
@RET@		FcFontSet *
Packit 352660
@FUNC@		FcFontSetList
Packit 352660
@TYPE1@		FcConfig *			@ARG1@		config
Packit 352660
@TYPE2@		FcFontSet **			@ARG2@		sets
Packit 352660
@TYPE3@		int				@ARG3@		nsets
Packit 352660
@TYPE4@		FcPattern *			@ARG4@		pattern
Packit 352660
@TYPE5@		FcObjectSet *			@ARG5@		object_set
Packit 352660
@PURPOSE@	List fonts from a set of font sets
Packit 352660
@DESC@
Packit 352660
Selects fonts matching <parameter>pattern</parameter> from
Packit 352660
<parameter>sets</parameter>, creates patterns from those
Packit 352660
fonts containing only the objects in <parameter>object_set</parameter> and returns
Packit 352660
the set of unique such patterns.
Packit 352660
If <parameter>config</parameter> is NULL, the default configuration is checked
Packit 352660
to be up to date, and used.
Packit 352660
@@
Packit 352660
Packit 352660
@RET@		FcPattern *
Packit 352660
@FUNC@		FcFontSetMatch
Packit 352660
@TYPE1@		FcConfig *			@ARG1@		config
Packit 352660
@TYPE2@		FcFontSet **			@ARG2@		sets
Packit 352660
@TYPE3@		int				@ARG3@		nsets
Packit 352660
@TYPE4@		FcPattern *			@ARG4@		pattern
Packit 352660
@TYPE5@		FcResult *			@ARG5@		result
Packit 352660
@PURPOSE@	Return the best font from a set of font sets
Packit 352660
@DESC@
Packit 352660
Finds the font in <parameter>sets</parameter> most closely matching
Packit 352660
<parameter>pattern</parameter> and returns the result of
Packit 352660
<function>FcFontRenderPrepare</function> for that font and the provided
Packit 352660
pattern. This function should be called only after
Packit 352660
<function>FcConfigSubstitute</function> and
Packit 352660
<function>FcDefaultSubstitute</function> have been called for
Packit 352660
<parameter>pattern</parameter>; otherwise the results will not be correct.
Packit 352660
If <parameter>config</parameter> is NULL, the current configuration is used.
Packit 352660
Returns NULL if an error occurs during this process.
Packit 352660
@@
Packit 352660
Packit 352660
@RET@		void
Packit 352660
@FUNC@		FcFontSetPrint
Packit 352660
@TYPE1@		FcFontSet *			@ARG1@		set
Packit 352660
@PURPOSE@	Print a set of patterns to stdout
Packit 352660
@DESC@
Packit 352660
This function is useful for diagnosing font related issues, printing the
Packit 352660
complete contents of every pattern in <parameter>set</parameter>. The format
Packit 352660
of the output is designed to be of help to users and developers, and may
Packit 352660
change at any time.
Packit 352660
@@
Packit 352660
Packit 352660
@RET@		
Packit 352660
@FUNC@		FcFontSetSort
Packit 352660
@TYPE1@         FcConfig *			@ARG1@		config
Packit 352660
@TYPE2@		FcFontSet **			@ARG2@		sets
Packit 352660
@TYPE3@		int				@ARG3@		nsets
Packit 352660
@TYPE4@		FcPattern *			@ARG4@		pattern
Packit 352660
@TYPE5@		FcBool%				@ARG5@		trim
Packit 352660
@TYPE6@		FcCharSet **			@ARG6@		csp
Packit 352660
@TYPE7@		FcResult *                      @ARG7@          result
Packit 352660
@PURPOSE@	Add to a font set
Packit 352660
@DESC@
Packit 352660
Returns the list of fonts from <parameter>sets</parameter>
Packit 352660
sorted by closeness to <parameter>pattern</parameter>.  
Packit 352660
If <parameter>trim</parameter> is FcTrue,
Packit 352660
elements in the list which don't include Unicode coverage not provided by
Packit 352660
earlier elements in the list are elided.  The union of Unicode coverage of
Packit 352660
all of the fonts is returned in <parameter>csp</parameter>,
Packit 352660
if <parameter>csp</parameter> is not NULL.  This function
Packit 352660
should be called only after FcConfigSubstitute and FcDefaultSubstitute have
Packit 352660
been called for <parameter>p</parameter>;
Packit 352660
otherwise the results will not be correct.
Packit 352660
    </para><para>
Packit 352660
The returned FcFontSet references FcPattern structures which may be shared
Packit 352660
by the return value from multiple FcFontSort calls, applications cannot
Packit 352660
modify these patterns.  Instead, they should be passed, along with
Packit 352660
<parameter>pattern</parameter> to
Packit 352660
<function>FcFontRenderPrepare</function> which combines them into a complete pattern.
Packit 352660
    </para><para>
Packit 352660
The FcFontSet returned by FcFontSetSort is destroyed by calling FcFontSetDestroy.
Packit 352660
@@
Packit 352660
Packit 352660
@RET@		
Packit 352660
@FUNC@		FcFontSetSortDestroy
Packit 352660
@TYPE1@		FcFontSet *			@ARG1@		set
Packit 352660
@PURPOSE@	DEPRECATED destroy a font set
Packit 352660
@DESC@
Packit 352660
This function is DEPRECATED. <function>FcFontSetSortDestroy</function>
Packit 352660
destroys <parameter>set</parameter> by calling
Packit 352660
<function>FcFontSetDestroy</function>. Applications should use
Packit 352660
<function>FcFontSetDestroy</function> directly instead.
Packit 352660
@@