2003-03-07 09:44:32 +01:00
|
|
|
/*
|
2008-08-13 09:30:23 +02:00
|
|
|
* fontconfig/doc/fcconfig.fncs
|
2003-03-07 09:44:32 +01:00
|
|
|
*
|
2004-12-07 02:14:46 +01:00
|
|
|
* Copyright © 2003 Keith Packard
|
2003-03-07 09:44:32 +01:00
|
|
|
*
|
|
|
|
* 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
|
2010-11-10 22:45:42 +01:00
|
|
|
* documentation, and that the name of the author(s) not be used in
|
2003-03-07 09:44:32 +01:00
|
|
|
* advertising or publicity pertaining to distribution of the software without
|
2010-11-10 22:45:42 +01:00
|
|
|
* specific, written prior permission. The authors make no
|
2003-03-07 09:44:32 +01:00
|
|
|
* representations about the suitability of this software for any purpose. It
|
|
|
|
* is provided "as is" without express or implied warranty.
|
|
|
|
*
|
2009-03-12 21:00:08 +01:00
|
|
|
* THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
2003-03-07 09:44:32 +01:00
|
|
|
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
2009-03-12 21:00:08 +01:00
|
|
|
* EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
2003-03-07 09:44:32 +01:00
|
|
|
* 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.
|
|
|
|
*/
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcConfig *
|
2003-03-07 09:44:32 +01:00
|
|
|
@FUNC@ FcConfigCreate
|
|
|
|
@TYPE1@ void
|
|
|
|
@PURPOSE@ Create a configuration
|
|
|
|
@DESC@
|
|
|
|
Creates an empty configuration.
|
|
|
|
@@
|
|
|
|
|
2008-08-23 00:08:07 +02:00
|
|
|
@RET@ FcConfig *
|
|
|
|
@FUNC@ FcConfigReference
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@PURPOSE@ Increment config reference count
|
|
|
|
@DESC@
|
|
|
|
Add another reference to <parameter>config</parameter>. Configs are freed only
|
|
|
|
when the reference count reaches zero.
|
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
|
|
|
In that case this function will be similar to FcConfigGetCurrent() except that
|
|
|
|
it increments the reference count before returning and the user is responsible
|
|
|
|
for destroying the configuration when not needed anymore.
|
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ void
|
|
|
|
@FUNC@ FcConfigDestroy
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Destroy a configuration
|
|
|
|
@DESC@
|
2008-08-23 00:08:07 +02:00
|
|
|
Decrements the config reference count. If all references are gone, destroys
|
|
|
|
the configuration and any data associated with it.
|
|
|
|
Note that calling this function with the return from FcConfigGetCurrent will
|
|
|
|
cause a new configuration to be created for use as current configuration.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcConfigSetCurrent
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Set configuration as default
|
|
|
|
@DESC@
|
2003-03-07 09:51:14 +01:00
|
|
|
Sets the current default configuration to <parameter>config</parameter>. Implicitly calls
|
2014-08-13 04:39:29 +02:00
|
|
|
FcConfigBuildFonts if necessary, and FcConfigReference() to inrease the reference count
|
|
|
|
in <parameter>config</parameter> since 2.12.0, returning FcFalse if that call fails.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcConfig *
|
2003-03-07 09:44:32 +01:00
|
|
|
@FUNC@ FcConfigGetCurrent
|
|
|
|
@TYPE1@ void
|
|
|
|
@PURPOSE@ Return current configuration
|
|
|
|
@DESC@
|
|
|
|
Returns the current default configuration.
|
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcConfigUptoDate
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Check timestamps on config files
|
|
|
|
@DESC@
|
2007-11-03 21:26:16 +01:00
|
|
|
Checks all of the files related to <parameter>config</parameter> and returns
|
|
|
|
whether any of them has been modified since the configuration was created.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2008-08-13 22:45:18 +02:00
|
|
|
@RET@ FcChar8 *
|
2007-11-04 06:23:28 +01:00
|
|
|
@FUNC@ FcConfigHome
|
|
|
|
@TYPE1@ void
|
|
|
|
@PURPOSE@ return the current home directory.
|
|
|
|
@DESC@
|
|
|
|
Return the current user's home directory, if it is available, and if using it
|
2008-08-13 22:45:18 +02:00
|
|
|
is enabled, and NULL otherwise.
|
|
|
|
See also <function>FcConfigEnableHome</function>).
|
2007-11-04 06:23:28 +01:00
|
|
|
@@
|
|
|
|
|
2011-03-14 22:23:56 +01:00
|
|
|
@RET@ FcBool
|
2007-11-04 06:23:28 +01:00
|
|
|
@FUNC@ FcConfigEnableHome
|
|
|
|
@TYPE1@ FcBool% @ARG1@ enable
|
|
|
|
@PURPOSE@ controls use of the home directory.
|
|
|
|
@DESC@
|
|
|
|
If <parameter>enable</parameter> is FcTrue, then Fontconfig will use various
|
|
|
|
files which are specified relative to the user's home directory (using the ~
|
|
|
|
notation in the configuration). When <parameter>enable</parameter> is
|
|
|
|
FcFalse, then all use of the home directory in these contexts will be
|
|
|
|
disabled. The previous setting of the value is returned.
|
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcConfigBuildFonts
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2003-03-07 09:44:32 +01:00
|
|
|
@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.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcStrList *
|
|
|
|
@FUNC@ FcConfigGetConfigDirs
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Get config directories
|
|
|
|
@DESC@
|
|
|
|
Returns the list of font directories specified in the configuration files
|
2003-03-07 09:51:14 +01:00
|
|
|
for <parameter>config</parameter>. Does not include any subdirectories.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcStrList *
|
|
|
|
@FUNC@ FcConfigGetFontDirs
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Get font directories
|
|
|
|
@DESC@
|
2003-03-07 09:51:14 +01:00
|
|
|
Returns the list of font directories in <parameter>config</parameter>. This includes the
|
2003-03-07 09:44:32 +01:00
|
|
|
configured font directories along with any directories below those in the
|
|
|
|
filesystem.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcStrList *
|
|
|
|
@FUNC@ FcConfigGetConfigFiles
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Get config files
|
|
|
|
@DESC@
|
2003-03-07 09:51:14 +01:00
|
|
|
Returns the list of known configuration files used to generate <parameter>config</parameter>.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2007-11-04 07:03:11 +01:00
|
|
|
@RET@ FcChar8 *
|
2003-03-07 20:01:41 +01:00
|
|
|
@FUNC@ FcConfigGetCache
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2007-11-04 06:39:54 +01:00
|
|
|
@PURPOSE@ DEPRECATED used to return per-user cache filename
|
2003-03-07 09:44:32 +01:00
|
|
|
@DESC@
|
2007-11-04 06:39:54 +01:00
|
|
|
With fontconfig no longer using per-user cache files, this function now
|
|
|
|
simply returns NULL to indicate that no per-user file exists.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2007-11-04 06:23:28 +01:00
|
|
|
@RET@ FcStrList *
|
|
|
|
@FUNC@ FcConfigGetCacheDirs
|
2012-03-28 10:28:06 +02:00
|
|
|
@TYPE1@ const FcConfig * @ARG1@ config
|
2007-11-04 06:23:28 +01:00
|
|
|
@PURPOSE@ return the list of directories searched for cache files
|
|
|
|
@DESC@
|
|
|
|
<function>FcConfigGetCacheDirs</function> returns a string list containing
|
|
|
|
all of the directories that fontconfig will search when attempting to load a
|
|
|
|
cache file for a font directory.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2007-11-04 06:23:28 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcFontSet *
|
|
|
|
@FUNC@ FcConfigGetFonts
|
2003-03-07 09:44:32 +01:00
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2006-12-03 00:06:13 +01:00
|
|
|
@TYPE2@ FcSetName% @ARG2@ set
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Get config font set
|
|
|
|
@DESC@
|
2003-03-07 20:01:41 +01:00
|
|
|
Returns one of the two sets of fonts from the configuration as specified
|
2007-11-14 00:16:58 +01:00
|
|
|
by <parameter>set</parameter>. This font set is owned by the library and must
|
2009-01-01 22:29:01 +01:00
|
|
|
not be modified or freed.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcBlanks *
|
|
|
|
@FUNC@ FcConfigGetBlanks
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Get config blanks
|
|
|
|
@DESC@
|
2017-09-12 23:08:08 +02:00
|
|
|
FcBlanks is deprecated.
|
|
|
|
This function always returns NULL.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ int
|
2007-10-25 09:49:19 +02:00
|
|
|
@FUNC@ FcConfigGetRescanInterval
|
2003-03-07 20:01:41 +01:00
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Get config rescan interval
|
|
|
|
@DESC@
|
|
|
|
Returns the interval between automatic checks of the configuration (in
|
2003-03-07 09:51:14 +01:00
|
|
|
seconds) specified in <parameter>config</parameter>. The configuration is checked during
|
2003-03-07 09:44:32 +01:00
|
|
|
a call to FcFontList when this interval has passed since the last check.
|
2008-08-13 09:16:39 +02:00
|
|
|
An interval setting of zero disables automatic checks.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcBool
|
2007-10-25 09:49:19 +02:00
|
|
|
@FUNC@ FcConfigSetRescanInterval
|
2003-03-07 09:44:32 +01:00
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2006-12-03 00:06:13 +01:00
|
|
|
@TYPE2@ int% @ARG2@ rescanInterval
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Set config rescan interval
|
|
|
|
@DESC@
|
2007-11-13 23:58:39 +01:00
|
|
|
Sets the rescan interval. Returns FcFalse if the interval cannot be set (due
|
|
|
|
to allocation failure). Otherwise returns FcTrue.
|
2008-08-13 09:16:39 +02:00
|
|
|
An interval setting of zero disables automatic checks.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcConfigAppFontAddFile
|
2003-03-07 09:44:32 +01:00
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2007-11-04 07:03:11 +01:00
|
|
|
@TYPE2@ const FcChar8 * @ARG2@ file
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Add font file to font database
|
|
|
|
@DESC@
|
2007-11-13 23:58:39 +01:00
|
|
|
Adds an application-specific font to the configuration. Returns FcFalse
|
2014-12-09 11:06:46 +01:00
|
|
|
if the fonts cannot be added (due to allocation failure or no fonts found).
|
|
|
|
Otherwise returns FcTrue. If <parameter>config</parameter> is NULL,
|
|
|
|
the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcConfigAppFontAddDir
|
2003-03-07 09:44:32 +01:00
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2007-11-04 07:03:11 +01:00
|
|
|
@TYPE2@ const FcChar8 * @ARG2@ dir
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Add fonts from directory to font database
|
|
|
|
@DESC@
|
|
|
|
Scans the specified directory for fonts, adding each one found to the
|
2007-11-13 23:58:39 +01:00
|
|
|
application-specific set of fonts. Returns FcFalse
|
2015-06-27 02:02:13 +02:00
|
|
|
if the fonts cannot be added (due to allocation failure).
|
2014-12-09 11:06:46 +01:00
|
|
|
Otherwise returns FcTrue. If <parameter>config</parameter> is NULL,
|
|
|
|
the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ void
|
|
|
|
@FUNC@ FcConfigAppFontClear
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Remove all app fonts from font database
|
|
|
|
@DESC@
|
|
|
|
Clears the set of application-specific fonts.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcConfigSubstituteWithPat
|
2003-03-07 09:44:32 +01:00
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@TYPE2@ FcPattern * @ARG2@ p
|
|
|
|
@TYPE3@ FcPattern * @ARG3@ p_pat
|
2006-12-03 00:06:13 +01:00
|
|
|
@TYPE4@ FcMatchKind% @ARG4@ kind
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Execute substitutions
|
|
|
|
@DESC@
|
2003-03-07 09:51:14 +01:00
|
|
|
Performs the sequence of pattern modification operations, if <parameter>kind</parameter> is
|
2003-03-07 20:01:41 +01:00
|
|
|
FcMatchPattern, then those tagged as pattern operations are applied, else
|
2003-03-07 09:51:14 +01:00
|
|
|
if <parameter>kind</parameter> is FcMatchFont, those tagged as font operations are applied and
|
2007-11-13 23:58:39 +01:00
|
|
|
p_pat is used for <test> elements with target=pattern. Returns FcFalse
|
|
|
|
if the substitution cannot be performed (due to allocation failure). Otherwise returns FcTrue.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcConfigSubstitute
|
2003-03-07 09:44:32 +01:00
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@TYPE2@ FcPattern * @ARG2@ p
|
2006-12-03 00:06:13 +01:00
|
|
|
@TYPE3@ FcMatchKind% @ARG3@ kind
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Execute substitutions
|
|
|
|
@DESC@
|
2007-11-13 23:58:39 +01:00
|
|
|
Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns FcFalse
|
|
|
|
if the substitution cannot be performed (due to allocation failure). Otherwise returns FcTrue.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcPattern *
|
|
|
|
@FUNC@ FcFontMatch
|
2003-03-07 09:44:32 +01:00
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@TYPE2@ FcPattern * @ARG2@ p
|
2003-03-07 20:01:41 +01:00
|
|
|
@TYPE3@ FcResult * @ARG3@ result
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Return best font
|
|
|
|
@DESC@
|
2007-11-14 00:11:35 +01:00
|
|
|
Finds the font in <parameter>sets</parameter> most closely matching
|
|
|
|
<parameter>pattern</parameter> and returns the result of
|
|
|
|
<function>FcFontRenderPrepare</function> for that font and the provided
|
|
|
|
pattern. This function should be called only after
|
|
|
|
<function>FcConfigSubstitute</function> and
|
|
|
|
<function>FcDefaultSubstitute</function> have been called for
|
|
|
|
<parameter>p</parameter>; otherwise the results will not be correct.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcFontSet *
|
|
|
|
@FUNC@ FcFontSort
|
2003-03-07 09:44:32 +01:00
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@TYPE2@ FcPattern * @ARG2@ p
|
2006-12-03 00:06:13 +01:00
|
|
|
@TYPE3@ FcBool% @ARG3@ trim
|
2003-03-07 09:44:32 +01:00
|
|
|
@TYPE4@ FcCharSet ** @ARG4@ csp
|
2003-03-07 20:01:41 +01:00
|
|
|
@TYPE5@ FcResult * @ARG5@ result
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Return list of matching fonts
|
|
|
|
@DESC@
|
2003-03-07 09:51:14 +01:00
|
|
|
Returns the list of fonts sorted by closeness to <parameter>p</parameter>. If <parameter>trim</parameter> is FcTrue,
|
2003-03-07 09:44:32 +01:00
|
|
|
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
|
2003-03-07 09:51:14 +01:00
|
|
|
all of the fonts is returned in <parameter>csp</parameter>, if <parameter>csp</parameter> is not NULL. This function
|
2003-03-07 09:44:32 +01:00
|
|
|
should be called only after FcConfigSubstitute and FcDefaultSubstitute have
|
2003-03-07 09:51:14 +01:00
|
|
|
been called for <parameter>p</parameter>; otherwise the results will not be correct.
|
2003-03-07 09:44:32 +01:00
|
|
|
</para><para>
|
|
|
|
The returned FcFontSet references FcPattern structures which may be shared
|
|
|
|
by the return value from multiple FcFontSort calls, applications must not
|
2003-03-07 09:51:14 +01:00
|
|
|
modify these patterns. Instead, they should be passed, along with <parameter>p</parameter> to
|
2007-11-14 00:11:35 +01:00
|
|
|
<function>FcFontRenderPrepare</function> which combines them into a complete pattern.
|
2003-03-07 09:44:32 +01:00
|
|
|
</para><para>
|
2011-03-14 22:23:56 +01:00
|
|
|
The FcFontSet returned by FcFontSort is destroyed by calling FcFontSetDestroy.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the current configuration is used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcPattern *
|
|
|
|
@FUNC@ FcFontRenderPrepare
|
2003-03-07 09:44:32 +01:00
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@TYPE2@ FcPattern * @ARG2@ pat
|
2003-03-07 20:01:41 +01:00
|
|
|
@TYPE3@ FcPattern * @ARG3@ font
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ Prepare pattern for loading font file
|
|
|
|
@DESC@
|
2003-03-07 09:51:14 +01:00
|
|
|
Creates a new pattern consisting of elements of <parameter>font</parameter> not appearing
|
|
|
|
in <parameter>pat</parameter>, elements of <parameter>pat</parameter> not appearing in <parameter>font</parameter> and the best matching
|
|
|
|
value from <parameter>pat</parameter> for elements appearing in both. The result is passed to
|
2008-08-12 20:32:40 +02:00
|
|
|
FcConfigSubstituteWithPat with <parameter>kind</parameter> FcMatchFont and then returned.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2003-03-07 20:01:41 +01:00
|
|
|
@RET@ FcFontSet *
|
|
|
|
@FUNC@ FcFontList
|
2003-03-07 09:44:32 +01:00
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@TYPE2@ FcPattern * @ARG2@ p
|
2003-03-07 20:01:41 +01:00
|
|
|
@TYPE3@ FcObjectSet * @ARG3@ os
|
2003-03-07 09:44:32 +01:00
|
|
|
@PURPOSE@ List fonts
|
|
|
|
@DESC@
|
2003-03-07 09:51:14 +01:00
|
|
|
Selects fonts matching <parameter>p</parameter>, creates patterns from those fonts containing
|
|
|
|
only the objects in <parameter>os</parameter> and returns the set of unique such patterns.
|
2008-08-22 23:49:02 +02:00
|
|
|
If <parameter>config</parameter> is NULL, the default configuration is checked
|
|
|
|
to be up to date, and used.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
|
|
|
|
2007-11-04 07:03:11 +01:00
|
|
|
@RET@ FcChar8 *
|
2003-03-07 20:01:41 +01:00
|
|
|
@FUNC@ FcConfigFilename
|
2007-11-04 07:03:11 +01:00
|
|
|
@TYPE1@ const FcChar8 * @ARG1@ name
|
2003-03-07 09:44:32 +01:00
|
|
|
@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
|
2003-03-07 20:01:41 +01:00
|
|
|
references into filename form.
|
2003-03-07 09:44:32 +01:00
|
|
|
</para><para>
|
2003-03-07 09:51:14 +01:00
|
|
|
A null or empty <parameter>name</parameter> indicates that the default configuration file should
|
2003-03-07 09:44:32 +01:00
|
|
|
be used; which file this references can be overridden with the
|
2012-04-16 13:25:52 +02:00
|
|
|
FONTCONFIG_FILE environment variable. Next, if the name starts with <parameter>~</parameter>, it
|
2003-03-07 09:44:32 +01:00
|
|
|
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
|
2012-04-16 13:25:52 +02:00
|
|
|
FONTCONFIG_PATH environment variable.
|
2003-03-07 09:44:32 +01:00
|
|
|
@@
|
2003-03-07 20:01:41 +01:00
|
|
|
|
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcConfigParseAndLoad
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@TYPE2@ const FcChar8 * @ARG2@ file
|
2007-10-18 17:56:42 +02:00
|
|
|
@TYPE3@ FcBool% @ARG3@ complain
|
2003-03-07 20:01:41 +01:00
|
|
|
@PURPOSE@ load a configuration file
|
|
|
|
@DESC@
|
|
|
|
Walks the configuration in 'file' and constructs the internal representation
|
|
|
|
in 'config'. Any include files referenced from within 'file' will be loaded
|
2007-11-13 23:58:39 +01:00
|
|
|
and parsed. If 'complain' is FcFalse, no warning will be displayed if
|
|
|
|
'file' does not exist. Error and warning messages will be output to stderr.
|
|
|
|
Returns FcFalse if some error occurred while loading the file, either a
|
|
|
|
parse error, semantic error or allocation failure. Otherwise returns FcTrue.
|
2003-03-07 20:01:41 +01:00
|
|
|
@@
|
2013-02-06 11:35:30 +01:00
|
|
|
|
2015-06-11 10:30:04 +02:00
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcConfigParseAndLoadFromMemory
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@TYPE2@ const FcChar8 * @ARG2@ buffer
|
|
|
|
@TYPE3@ FcBool% @ARG3@ complain
|
|
|
|
@PURPOSE@ load a configuration from memory
|
|
|
|
@DESC@
|
|
|
|
Walks the configuration in 'memory' and constructs the internal representation
|
|
|
|
in 'config'. Any includes files referenced from within 'memory' will be loaded
|
|
|
|
and dparsed. If 'complain' is FcFalse, no warning will be displayed if
|
|
|
|
'file' does not exist. Error and warning messages will be output to stderr.
|
|
|
|
Returns FcFalse if fsome error occurred while loading the file, either a
|
|
|
|
parse error, semantic error or allocation failure. Otherwise returns FcTrue.
|
2017-09-09 15:17:16 +02:00
|
|
|
@SINCE@ 2.12.5
|
2015-06-11 10:30:04 +02:00
|
|
|
@@
|
|
|
|
|
2013-02-06 11:35:30 +01:00
|
|
|
@RET@ const FcChar8 *
|
|
|
|
@FUNC@ FcConfigGetSysRoot
|
|
|
|
@TYPE1@ const FcConfig * @ARG1@ config
|
|
|
|
@PURPOSE@ Obtain the system root directory
|
|
|
|
@DESC@
|
2019-02-19 01:40:32 +01:00
|
|
|
Obtains the system root directory in 'config' if available. All files
|
|
|
|
(including file properties in patterns) obtained from this 'config' are
|
|
|
|
relative to this system root directory.
|
2014-03-07 11:42:21 +01:00
|
|
|
@SINCE@ 2.10.92
|
2013-02-06 11:35:30 +01:00
|
|
|
@@
|
|
|
|
|
|
|
|
@RET@ void
|
|
|
|
@FUNC@ FcConfigSetSysRoot
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@TYPE2@ const FcChar8 * @ARG2@ sysroot
|
|
|
|
@PURPOSE@ Set the system root directory
|
|
|
|
@DESC@
|
2019-02-19 01:40:32 +01:00
|
|
|
Set 'sysroot' as the system root directory. All file paths used or created with
|
|
|
|
this 'config' (including file properties in patterns) will be considered or
|
|
|
|
made relative to this 'sysroot'. This allows a host to generate caches for
|
|
|
|
targets at build time. This also allows a cache to be re-targeted to a
|
|
|
|
different base directory if 'FcConfigGetSysRoot' is used to resolve file paths.
|
|
|
|
When setting this on the current config this causes changing current config
|
|
|
|
(calls FcConfigSetCurrent()).
|
2014-03-07 11:42:21 +01:00
|
|
|
@SINCE@ 2.10.92
|
2013-02-06 11:35:30 +01:00
|
|
|
@@
|
|
|
|
|
2014-03-27 07:10:44 +01:00
|
|
|
@RET@ void
|
|
|
|
@FUNC@ FcConfigFileInfoIterInit
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@TYPE2@ FcConfigFileInfoIter * @ARG2@ iter
|
|
|
|
@PURPOSE@ Initialize the iterator
|
|
|
|
@DESC@
|
|
|
|
Initialize 'iter' with the first iterator in the config file information list.
|
|
|
|
@SINCE@ 2.12.91
|
|
|
|
@@
|
|
|
|
|
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcConfigFileInfoIterNext
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@TYPE2@ FcConfigFileInfoIter * @ARG2@ iter
|
|
|
|
@PURPOSE@ Set the iterator to point to the next list
|
|
|
|
@DESC@
|
|
|
|
Set 'iter' to point to the next node in the config file information list.
|
|
|
|
If there is no next node, FcFalse is returned.
|
|
|
|
@SINCE@ 2.12.91
|
|
|
|
@@
|
|
|
|
|
|
|
|
@RET@ FcBool
|
|
|
|
@FUNC@ FcConfigFileInfoIterGet
|
|
|
|
@TYPE1@ FcConfig * @ARG1@ config
|
|
|
|
@TYPE2@ FcConfigFileInfoIter * @ARG2@ iter
|
|
|
|
@TYPE3@ FcChar8 ** @ARG3@ name
|
|
|
|
@TYPE4@ FcChar8 ** @ARG4@ description
|
|
|
|
@TYPE5@ FcBool * @ARG5@ enabled
|
|
|
|
@PURPOSE@ Obtain the configuration file information
|
|
|
|
@DESC@
|
|
|
|
Obtain the filename, the description and the flag whether it is enabled or not
|
|
|
|
for 'iter' where points to current configuration file information.
|
|
|
|
If the iterator is invalid, FcFalse is returned.
|
|
|
|
@SINCE@ 2.12.91
|
|
|
|
@@
|