Add lots more function documentation

This commit is contained in:
Keith Packard 2003-03-07 08:44:32 +00:00
parent 22671e2551
commit bfc2dc3ac4
12 changed files with 677 additions and 276 deletions

View File

@ -11,13 +11,25 @@ DOC_FUNCS_FNCS=\
fcmatrix.fncs \
fccharset.fncs \
fcvalue.fncs \
fcpattern.fncs
fcpattern.fncs \
fcfontset.fncs \
fcobjectset.fncs \
fcobjecttype.fncs \
fcconstant.fncs \
fcblanks.fncs \
fcconfig.fncs
DOC_FUNCS_SGML=\
fcmatrix.sgml \
fccharset.sgml \
fcvalue.sgml \
fcpattern.sgml
fcpattern.sgml \
fcfontset.sgml \
fcobjectset.sgml \
fcobjecttype.sgml \
fcconstant.sgml \
fcblanks.sgml \
fcconfig.sgml
man3_MANS= \
FcCharSetAddChar.3 \

58
doc/fcblanks.fncs Normal file
View File

@ -0,0 +1,58 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
@RET@ FcBlanks *
@FUNC@ FcBlanksCreate
@TYPE1@ void
@PURPOSE@ Create an FcBlanks
@DESC@
Creates an empty FcBlanks object.
@@
@RET@ void
@FUNC@ FcBlanksDestroy
@TYPE1@ FcBlanks * @ARG1@ b
@PURPOSE@ Destroy and FcBlanks
@DESC@
Destroys an FcBlanks object, freeing any associated memory.
@@
@RET@ FcBool
@FUNC@ FcBlanksAdd
@TYPE1@ FcBlanks * @ARG1@ b
@TYPE2@ FcChar32 @ARG2@ ucs4
@PURPOSE@ Add a character to an FcBlanks
@DESC@
Adds a single character to an FcBlanks object, returning FcFalse
if this process ran out of memory.
@@
@RET@ FcBool
@FUNC@ FcBlanksIsMember
@TYPE1@ FcBlanks * @ARG1@ b
@TYPE2@ FcChar32 @ARG2@ ucs4
@PURPOSE@ Query membership in an FcBlanks
@DESC@
Returns whether the specified FcBlanks object contains the indicated Unicode
value.
@@

View File

@ -1,3 +1,26 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
@RET@ FcCharSet *
@FUNC@ FcCharSetCreate
@TYPE1@ void

279
doc/fcconfig.fncs Normal file
View File

@ -0,0 +1,279 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
@RET@ FcConfig *
@FUNC@ FcConfigCreate
@TYPE1@ void
@PURPOSE@ Create a configuration
@DESC@
Creates an empty configuration.
@@
@RET@ void
@FUNC@ FcConfigDestroy
@TYPE1@ FcConfig * @ARG1@ config
@PURPOSE@ Destroy a configuration
@DESC@
Destroys a configuration and any data associated with it. Note that calling
this function with the return from FcConfigGetCurrent will place the library
in an indeterminate state.
@@
@RET@ FcBool
@FUNC@ FcConfigSetCurrent
@TYPE1@ FcConfig * @ARG1@ config
@PURPOSE@ Set configuration as default
@DESC@
Sets the current default configuration to 'config'. Implicitly calls
FcConfigBuildFonts if necessary, returning FcFalse if that call fails.
@@
@RET@ FcConfig *
@FUNC@ FcConfigGetCurrent
@TYPE1@ void
@PURPOSE@ Return current configuration
@DESC@
Returns the current default configuration.
@@
@RET@ FcBool
@FUNC@ FcConfigUptoDate
@TYPE1@ FcConfig * @ARG1@ config
@PURPOSE@ Check timestamps on config files
@DESC@
Checks all of the files related to 'config' and returns whether the
in-memory version is in sync with the disk version.
@@
@RET@ FcBool
@FUNC@ FcConfigBuildFonts
@TYPE1@ FcConfig * @ARG1@ config
@PURPOSE@ Build font database
@DESC@
Builds the set of available fonts for the given configuration. Note that
any changes to the configuration after this call have indeterminate effects.
Returns FcFalse if this operation runs out of memory.
@@
@RET@ FcStrList *
@FUNC@ FcConfigGetConfigDirs
@TYPE1@ FcConfig * @ARG1@ config
@PURPOSE@ Get config directories
@DESC@
Returns the list of font directories specified in the configuration files
for 'config'. Does not include any subdirectories.
@@
@RET@ FcStrList *
@FUNC@ FcConfigGetFontDirs
@TYPE1@ FcConfig * @ARG1@ config
@PURPOSE@ Get font directories
@DESC@
Returns the list of font directories in 'config'. This includes the
configured font directories along with any directories below those in the
filesystem.
@@
@RET@ FcStrList *
@FUNC@ FcConfigGetConfigFiles
@TYPE1@ FcConfig * @ARG1@ config
@PURPOSE@ Get config files
@DESC@
Returns the list of known configuration files used to generate 'config'.
Note that this will not include any configuration done with FcConfigParse.
@@
@RET@ char *
@FUNC@ FcConfigGetCache
@TYPE1@ FcConfig * @ARG1@ config
@PURPOSE@ Get cache filename
@DESC@
Returns the name of the file used to store per-user font information.
@@
@RET@ FcFontSet *
@FUNC@ FcConfigGetFonts
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ FcSetName @ARG2@ set
@PURPOSE@ Get config font set
@DESC@
Returns one of the two sets of fonts from the configuration as specified
by 'set'.
@@
@RET@ FcBlanks *
@FUNC@ FcConfigGetBlanks
@TYPE1@ FcConfig * @ARG1@ config
@PURPOSE@ Get config blanks
@DESC@
Returns the FcBlanks object associated with the given configuration, if no
blanks were present in the configuration, this function will return 0.
@@
@RET@ int
@FUNC@ FcConfigGetRescanInverval
@TYPE1@ FcConfig * @ARG1@ config
@PURPOSE@ Get config rescan interval
@DESC@
Returns the interval between automatic checks of the configuration (in
seconds) specified in 'config'. The configuration is checked during
a call to FcFontList when this interval has passed since the last check.
@@
@RET@ FcBool
@FUNC@ FcConfigSetRescanInverval
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ int @ARG2@ rescanInterval
@PURPOSE@ Set config rescan interval
@DESC@
Sets the rescan interval; returns FcFalse if an error occurred.
@@
@RET@ FcBool
@FUNC@ FcConfigAppFontAddFile
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ const char * @ARG2@ file
@PURPOSE@ Add font file to font database
@DESC@
Adds an application-specific font to the configuration.
@@
@RET@ FcBool
@FUNC@ FcConfigAppFontAddDir
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ const char * @ARG1@ dir
@PURPOSE@ Add fonts from directory to font database
@DESC@
Scans the specified directory for fonts, adding each one found to the
application-specific set of fonts.
@@
@RET@ void
@FUNC@ FcConfigAppFontClear
@TYPE1@ FcConfig * @ARG1@ config
@PURPOSE@ Remove all app fonts from font database
@DESC@
Clears the set of application-specific fonts.
@@
@RET@ FcBool
@FUNC@ FcConfigSubstituteWithPat
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ FcPattern * @ARG2@ p
@TYPE3@ FcPattern * @ARG3@ p_pat
@TYPE4@ FcMatchKind @ARG4@ kind
@PURPOSE@ Execute substitutions
@DESC@
Performs the sequence of pattern modification operations, if 'kind' is
FcMatchPattern, then those tagged as pattern operations are applied, else
if 'kind' is FcMatchFont, those tagged as font operations are applied and
p_pat is used for <test> elements with target=pattern.
@@
@RET@ FcBool
@FUNC@ FcConfigSubstitute
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ FcPattern * @ARG2@ p
@TYPE3@ FcMatchKind @ARG3@ kind
@PURPOSE@ Execute substitutions
@DESC@
Calls FcConfigSubstituteWithPat setting p_pat to NULL.
@@
@RET@ FcPattern *
@FUNC@ FcFontMatch
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ FcPattern * @ARG2@ p
@TYPE3@ FcResult * @ARG3@ result
@PURPOSE@ Return best font
@DESC@
Returns the font in 'config' most close matching 'p'. This function
should be called only after FcConfigSubstitute and FcDefaultSubstitute have
been called for 'p'; otherwise the results will not be correct.
@@
@RET@ FcFontSet *
@FUNC@ FcFontSort
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ FcPattern * @ARG2@ p
@TYPE3@ FcBool @ARG3@ trim
@TYPE4@ FcCharSet ** @ARG4@ csp
@TYPE5@ FcResult * @ARG5@ result
@PURPOSE@ Return list of matching fonts
@DESC@
Returns the list of fonts sorted by closeness to 'p'. If 'trim' 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 'csp', if 'csp' is not NULL. This function
should be called only after FcConfigSubstitute and FcDefaultSubstitute have
been called for 'p'; otherwise the results will not be correct.
</para><para>
The returned FcFontSet references FcPattern structures which may be shared
by the return value from multiple FcFontSort calls, applications must not
modify these patterns. Instead, they should be passed, along with 'p' to
FcFontRenderPrepare which combines them into a complete pattern.
</para><para>
The FcFontSet returned by FcFontSort is destroyed by caling FcFontSetDestroy.
@@
@RET@ FcPattern *
@FUNC@ FcFontRenderPrepare
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ FcPattern * @ARG2@ pat
@TYPE3@ FcPattern * @ARG3@ font
@PURPOSE@ Prepare pattern for loading font file
@DESC@
Creates a new pattern consisting of elements of 'font' not appearing
in 'pat', elements of 'pat' not appearing in 'font' and the best matching
value from 'pat' for elements appearing in both. The result is passed to
FcConfigSubstitute with 'kind' FcMatchFont and then returned.
@@
@RET@ FcFontSet *
@FUNC@ FcFontList
@TYPE1@ FcConfig * @ARG1@ config
@TYPE2@ FcPattern * @ARG2@ p
@TYPE3@ FcObjectSet * @ARG3@ os
@PURPOSE@ List fonts
@DESC@
Selects fonts matching 'p', creates patterns from those fonts containing
only the objects in 'os' and returns the set of unique such patterns.
@@
@RET@ char *
@FUNC@ FcConfigFilename
@TYPE1@ const char * @ARG1@ name
@PURPOSE@ Find a config file
@DESC@
Given the specified external entity name, return the associated filename.
This provides applications a way to convert various configuration file
references into filename form.
</para><para>
A null or empty 'name' indicates that the default configuration file should
be used; which file this references can be overridden with the
FC_CONFIG_FILE environment variable. Next, if the name starts with '~', it
refers to a file in the current users home directory. Otherwise if the name
doesn't start with '/', it refers to a file in the default configuration
directory; the built-in default directory can be overridden with the
FC_CONFIG_DIR environment variable.
@@

58
doc/fcconstant.fncs Normal file
View File

@ -0,0 +1,58 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
@RET@ FcBool
@FUNC@ FcNameRegisterConstants
@TYPE1@ const FcConstant * @ARG1@ consts
@TYPE2@ int @ARG2@ nconsts
@PURPOSE@ Register symbolic constants
@DESC@
Register 'nconsts' new symbolic constants.
@@
@RET@ FcBool
@FUNC@ FcNameUnregisterConstants
@TYPE1@ const FcConstant * @ARG1@ consts
@TYPE2@ int @ARG2@ nconsts
@PURPOSE@ Unregister symbolic constants
@DESC@
Unregister 'nconsts' symbolic constants.
@@
@RET@ const FcConstant *
@FUNC@ FcNameGetConstant
@TYPE1@ FcChar8 * @ARG1@ string
@PURPOSE@ Lookup symbolic constant
@DESC@
Return the FcConstant structure related to symbolic constant 'string'.
@@
@RET@ FcBool
@FUNC@ FcNameConstant
@TYPE1@ FcChar8 * @ARG1@ string
@TYPE2@ int * @ARG2@ result
@PURPOSE@ Get the value for a symbolic constant
@DESC@
Returns whether a symbolic constant with name 'string' is registered,
placing the value of the constant in 'result' if present.
@@

49
doc/fcfontset.fncs Normal file
View File

@ -0,0 +1,49 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
@RET@ FcFontSet *
@FUNC@ FcFontSetCreate
@TYPE1@ void
@PURPOSE@ Create a font set
@DESC@
Creates an empty font set.
@@
@RET@ void
@FUNC@ FcFontSetDestroy
@TYPE1@ FcFontSet * @ARG1@ s
@PURPOSE@ Destroy a font set
@DESC@
Destroys a font set. Note that this destroys any referenced patterns as
well.
@@
@RET@ FcBool
@FUNC@ FcFontSetAdd
@TYPE1@ FcFontSet * @ARG1@ s
@TYPE2@ FcPattern * @ARG2@ font
@PURPOSE@ Add to a font set
@DESC@
Adds a pattern to a font set. Note that the pattern is not copied before
being inserted into the set.
@@

View File

@ -1,3 +1,26 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
@FUNC@ FcMatrixInit
@PURPOSE@ initialize an FcMatrix structure
@TYPE1@ FcMatrix *

61
doc/fcobjectset.fncs Normal file
View File

@ -0,0 +1,61 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
@RET@ FcObjectSet *
@FUNC@ FcObjectSetCreate
@TYPE1@ void
@PURPOSE@ Create an object set
@DESC@
Creates an empty set.
@@
@RET@ FcBool
@FUNC@ FcObjectSetAdd
@TYPE1@ FcObjectSet * @ARG1@ os
@TYPE2@ const char * @ARG2@ object
@PURPOSE@ Add to an object set
@DESC@
Adds a proprety name to the set.
@@
@RET@ void
@FUNC@ FcObjectSetDestroy
@TYPE1@ FcObjectSet * @ARG1@ os
@PURPOSE@ Destroy an object set
@DESC@
Destroys an object set.
@@
@RET@ FcObjectSet *
@FUNC@ FcObjectSetBuild
@TYPE1@ const char * @ARG1@ first
@TYPE2@ ...
@PROTOTYPE+@
@RET+@ FcObjectSet *
@FUNC+@ FcObjectSetVaBuild
@TYPE1+@ const char * @ARG1+@ first
@TYPE2+@ va_list @ARG2+@ va
@PURPOSE@ Build object set from args
@DESC@
These build an object set from a null-terminated list of property names.
@@

48
doc/fcobjecttype.fncs Normal file
View File

@ -0,0 +1,48 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
@RET@ FcBool
@FUNC@ FcNameRegisterObjectTypes
@TYPE1@ const FcObjectType * @ARG1@ types
@TYPE2@ int @ARG2@ ntype
@PURPOSE@ Register object types
@DESC@
Register 'ntype' new object types.
@@
@RET@ FcBool
@FUNC@ FcNameUnregisterObjectTypes
@TYPE1@ const FcObjectType * @ARG1@ types
@TYPE2@ int @ARG2@ ntype
@PURPOSE@ Unregister object types
@DESC@
Unregister 'ntype' object types.
@@
@RET@ const FcObjectType *
@FUNC@ FcNameGetObjectType
@TYPE1@ const char * @ARG1@ object
@PURPOSE@ Lookup an object type
@DESC@
Return the object type for the pattern element named 'object'.
@@

View File

@ -1,3 +1,26 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
@RET@ FcPattern *
@FUNC@ FcPatternCreate
@TYPE1@ void

View File

@ -1,3 +1,26 @@
/*
* $Id$
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
@RET@ void
@FUNC@ FcValueDestroy
@TYPE1@ FcValue @ARG1@ v

View File

@ -3,6 +3,12 @@
<!ENTITY fccharset SYSTEM "fccharset.sgml">
<!ENTITY fcvalue SYSTEM "fcvalue.sgml">
<!ENTITY fcpattern SYSTEM "fcpattern.sgml">
<!ENTITY fcfontset SYSTEM "fcfontset.sgml">
<!ENTITY fcobjectset SYSTEM "fcobjectset.sgml">
<!ENTITY fcobjecttype SYSTEM "fcobjecttype.sgml">
<!ENTITY fcconstant SYSTEM "fcconstant.sgml">
<!ENTITY fcblanks SYSTEM "fcblanks.sgml">
<!ENTITY fcconfig SYSTEM "fcconfig.sgml">
]>
<!--
$Id$
@ -410,103 +416,29 @@ available fonts, as well as the information about each font.
An FcFontSet simply holds a list of patterns; these are used to return the
results of listing available fonts.
</para>
<variablelist>
<varlistentry><term>
FcFontSet *FcFontSetCreate (void);
</term><listitem><para>
Creates an empty font set.
</para></listitem></varlistentry>
<varlistentry><term>
void FcFontSetDestroy (FcFontSet *s);
</term><listitem><para>
Destroys a font set. Note that this destroys any referenced patterns as
well.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcFontSetAdd (FcFontSet *s, FcPattern *font);
</term><listitem><para>
Adds a pattern to a font set. Note that the pattern is not copied before
being inserted into the set.
</para></listitem></varlistentry>
</variablelist></sect2>
&fcfontset;
</sect2>
<sect2><title>FcObjectSet</title>
<para>
An FcObjectSet holds a list of pattern property names; it is used to
indiciate which properties are to be returned in the patterns from
FcFontList.
</para>
<variablelist>
<varlistentry><term>
FcObjectSet *FcObjectSetCreate (void);
</term><listitem><para>
Creates an empty set.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcObjectSetAdd (FcObjectSet *os, const char *object);
</term><listitem><para>
Adds a proprety name to the set.
</para></listitem></varlistentry>
<varlistentry><term>
void FcObjectSetDestroy (FcObjectSet *os);
</term><listitem><para>
Destroys an object set.
</para></listitem></varlistentry>
<varlistentry><term>
FcObjectSet *FcObjectSetBuild (const char *first, ...);
FcObjectSet *FcObjectSetVaBuild (const char *first, va_list va);
</term><listitem><para>
These build an object set from a null-terminated list of property names.
</para></listitem></varlistentry>
</variablelist></sect2>
&fcobjectset;
</sect2>
<sect2><title>FcObjectType</title>
<para>
Provides for applcation-specified font name object types so that new
pattern elements can be generated from font names.
</para>
<variablelist>
<varlistentry><term>
FcBool FcNameRegisterObjectTypes (const FcObjectType *types, int ntype);
</term><listitem><para>
Register 'ntype' new object types.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcNameUnregisterObjectTypes (const FcObjectType *types, int ntype);
</term><listitem><para>
Unregister 'ntype' object types.
</para></listitem></varlistentry>
<varlistentry><term>
const FcObjectType *FcNameGetObjectType (const char *object);
</term><listitem><para>
Return the object type for the pattern element named 'object'.
</para></listitem></varlistentry>
</variablelist></sect2>
&fcobjecttype;
</sect2>
<sect2><title>FcConstant</title>
<para>
Provides for application-specified symbolic constants for font names.
</para>
<variablelist>
<varlistentry><term>
FcBool FcNameRegisterConstants (const FcConstant *consts, int nconsts);
</term><listitem><para>
Register 'nconsts' new symbolic constants.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcNameUnregisterConstants (const FcConstant *consts, int nconsts);
</term><listitem><para>
Unregister 'nconsts' symbolic constants.
</para></listitem></varlistentry>
<varlistentry><term>
const FcConstant *FcNameGetConstant (FcChar8 *string);
</term><listitem><para>
Return the FcConstant structure related to symbolic constant 'string'.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcNameConstant (FcChar8 *string, int *result);
</term><listitem><para>
Returns whether a symbolic constant with name 'string' is registered,
placing the value of the constant in 'result' if present.
</para></listitem></varlistentry>
</variablelist></sect2>
&fcconstant;
</sect2>
<sect2><title>FcBlanks</title>
<para>
An FcBlanks object holds a list of Unicode chars which are expected to
@ -515,204 +447,16 @@ empty and not in this list will be assumed to be broken and not placed in
the FcCharSet associated with the font. This provides a significantly more
accurate CharSet for applications.
</para>
<variablelist>
<varlistentry><term>
FcBlanks *FcBlanksCreate (void);
</term><listitem><para>
Creates an empty FcBlanks object.
</para></listitem></varlistentry>
<varlistentry><term>
void FcBlanksDestroy (FcBlanks *b);
</term><listitem><para>
Destroys an FcBlanks object, freeing any associated memory.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcBlanksAdd (FcBlanks *b, FcChar32 ucs4);
</term><listitem><para>
Adds a single character to an FcBlanks object, returning FcFalse
if this process ran out of memory.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcBlanksIsMember (FcBlanks *b, FcChar32 ucs4);
</term><listitem><para>
Returns whether the specified FcBlanks object contains the indicated Unicode
value.
</para></listitem></varlistentry>
</variablelist></sect2>
&fcblanks;
</sect2>
<sect2><title>FcConfig</title>
<para>
An FcConfig object holds the internal representation of a configuration.
There is a default configuration which applications may use by passing 0 to
any function using the data within an FcConfig.
</para>
<variablelist>
<varlistentry><term>
FcConfig *FcConfigCreate (void);
</term><listitem><para>
Creates an empty configuration.
</para></listitem></varlistentry>
<varlistentry><term>
void FcConfigDestroy (FcConfig *config);
</term><listitem><para>
Destroys a configuration and any data associated with it. Note that calling
this function with the return from FcConfigGetCurrent will place the library
in an indeterminate state.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcConfigSetCurrent (FcConfig *config);
</term><listitem><para>
Sets the current default configuration to 'config'. Implicitly calls
FcConfigBuildFonts if necessary, returning FcFalse if that call fails.
</para></listitem></varlistentry>
<varlistentry><term>
FcConfig *FcConfigGetCurrent (void);
</term><listitem><para>
Returns the current default configuration.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcConfigUptoDate (FcConfig *config);
</term><listitem><para>
Checks all of the files related to 'config' and returns whether the
in-memory version is in sync with the disk version.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcConfigBuildFonts (FcConfig *config);
</term><listitem><para>
Builds the set of available fonts for the given configuration. Note that
any changes to the configuration after this call have indeterminate effects.
Returns FcFalse if this operation runs out of memory.
</para></listitem></varlistentry>
<varlistentry><term>
FcStrList *FcConfigGetConfigDirs (FcConfig *config);
</term><listitem><para>
Returns the list of font directories specified in the configuration files
for 'config'. Does not include any subdirectories.
</para></listitem></varlistentry>
<varlistentry><term>
FcStrList *FcConfigGetFontDirs (FcConfig *config);
</term><listitem><para>
Returns the list of font directories in 'config'. This includes the
configured font directories along with any directories below those in the
filesystem.
</para></listitem></varlistentry>
<varlistentry><term>
FcStrList *FcConfigGetConfigFiles (FcConfig *config);
</term><listitem><para>
Returns the list of known configuration files used to generate 'config'.
Note that this will not include any configuration done with FcConfigParse.
</para></listitem></varlistentry>
<varlistentry><term>
char *FcConfigGetCache (FcConfig *config);
</term><listitem><para>
Returns the name of the file used to store per-user font information.
</para></listitem></varlistentry>
<varlistentry><term>
FcFontSet *FcConfigGetFonts (FcConfig *config, FcSetName set);
</term><listitem><para>
Returns one of the two sets of fonts from the configuration as specified
by 'set'.
</para></listitem></varlistentry>
<varlistentry><term>
FcBlanks *FcConfigGetBlanks (FcConfig *config);
</term><listitem><para>
Returns the FcBlanks object associated with the given configuration, if no
blanks were present in the configuration, this function will return 0.
</para></listitem></varlistentry>
<varlistentry><term>
int FcConfigGetRescanInverval (FcConfig *config);
</term><listitem><para>
Returns the interval between automatic checks of the configuration (in
seconds) specified in 'config'. The configuration is checked during
a call to FcFontList when this interval has passed since the last check.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcConfigSetRescanInverval (FcConfig *config, int rescanInterval);
</term><listitem><para>
Sets the rescan interval; returns FcFalse if an error occurred.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcConfigAppFontAddFile (FcConfig *config, const char *file);
</term><listitem><para>
Adds an application-specific font to the configuration.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcConfigAppFontAddDir (FcConfig *config, const char *dir);
</term><listitem><para>
Scans the specified directory for fonts, adding each one found to the
application-specific set of fonts.
</para></listitem></varlistentry>
<varlistentry><term>
void FcConfigAppFontClear (FcConfig *config);
</term><listitem><para>
Clears the set of application-specific fonts.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcConfigSubstituteWithPat (FcConfig *config, FcPattern *p, FcPattern *p_pat FcMatchKind kind);
</term><listitem><para>
Performs the sequence of pattern modification operations, if 'kind' is
FcMatchPattern, then those tagged as pattern operations are applied, else
if 'kind' is FcMatchFont, those tagged as font operations are applied and
p_pat is used for &lt;test&gt; elements with target=pattern.
</para></listitem></varlistentry>
<varlistentry><term>
FcBool FcConfigSubstitute (FcConfig *config, FcPattern *p, FcMatchKind kind);
</term><listitem><para>
Calls FcConfigSubstituteWithPat setting p_pat to NULL.
</para></listitem></varlistentry>
<varlistentry><term>
FcPattern *FcFontMatch (FcConfig *config, FcPattern *p, FcResult *result);
</term><listitem><para>
Returns the font in 'config' most close matching 'p'. This function
should be called only after FcConfigSubstitute and FcDefaultSubstitute have
been called for 'p'; otherwise the results will not be correct.
</para></listitem></varlistentry>
<varlistentry><term>
FcFontSet *FcFontSort (FcConfig *config, FcPattern *p, FcBool trim, FcCharSet **csp, FcResult *result);
</term><listitem><para>
Returns the list of fonts sorted by closeness to 'p'. If 'trim' 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 'csp', if 'csp' is not NULL. This function
should be called only after FcConfigSubstitute and FcDefaultSubstitute have
been called for 'p'; otherwise the results will not be correct.
</para><para>
The returned FcFontSet references FcPattern structures which may be shared
by the return value from multiple FcFontSort calls, applications must not
modify these patterns. Instead, they should be passed, along with 'p' to
FcFontRenderPrepare which combines them into a complete pattern.
</para><para>
The FcFontSet returned by FcFontSort is destroyed by caling FcFontSetDestroy.
</para></listitem></varlistentry>
<varlistentry><term>
FcPattern *FcFontRenderPrepare (FcConfig *config, FcPattern *pat, FcPattern *font);
</term><listitem><para>
Creates a new pattern consisting of elements of 'font' not appearing
in 'pat', elements of 'pat' not appearing in 'font' and the best matching
value from 'pat' for elements appearing in both. The result is passed to
FcConfigSubstitute with 'kind' FcMatchFont and then returned.
</para></listitem></varlistentry>
<varlistentry><term>
FcFontSet *FcFontList (FcConfig *config, FcPattern *p, FcObjectSet *os);
</term><listitem><para>
Selects fonts matching 'p', creates patterns from those fonts containing
only the objects in 'os' and returns the set of unique such patterns.
</para></listitem></varlistentry>
<varlistentry><term>
char *FcConfigFilename (const char *name);
</term><listitem><para>
Given the specified external entity name, return the associated filename.
This provides applications a way to convert various configuration file
references into filename form.
</para><para>
A null or empty 'name' indicates that the default configuration file should
be used; which file this references can be overridden with the
FC_CONFIG_FILE environment variable. Next, if the name starts with '~', it
refers to a file in the current users home directory. Otherwise if the name
doesn't start with '/', it refers to a file in the default configuration
directory; the built-in default directory can be overridden with the
FC_CONFIG_DIR environment variable.
</para></listitem></varlistentry>
</variablelist></sect2>
&fcconfig;
</sect2>
<sect2><title>Initialization</title>
<para>
These functions provide some control over how the library is initialized.