X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=doc%2Ffcconfig.fncs;h=fb55adece1746c537459a07f207ed2e1b0e7e95d;hb=082caefb6d5462c97f280b7037e3740b4865a244;hp=998974fb55a82873fcb794d0af57a58f3d85bc7a;hpb=a190678e3c4497870679808dde418191407be91d;p=fontconfig.git diff --git a/doc/fcconfig.fncs b/doc/fcconfig.fncs index 998974f..fb55ade 100644 --- a/doc/fcconfig.fncs +++ b/doc/fcconfig.fncs @@ -1,5 +1,5 @@ /* - * $Id$ + * fontconfig/doc/fcconfig.fncs * * Copyright © 2003 Keith Packard * @@ -7,15 +7,15 @@ * 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 + * documentation, and that the name of the author(s) not be used in * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no + * specific, written prior permission. The authors make 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, + * THE AUTHOR(S) 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 + * EVENT SHALL THE AUTHOR(S) 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 @@ -29,14 +29,28 @@ Creates an empty configuration. @@ +@RET@ FcConfig * +@FUNC@ FcConfigReference +@TYPE1@ FcConfig * @ARG1@ config +@PURPOSE@ Increment config reference count +@DESC@ +Add another reference to config. Configs are freed only +when the reference count reaches zero. +If config 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. +@@ + @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. +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. @@ @RET@ FcBool @@ -63,18 +77,20 @@ Returns the current default configuration. @DESC@ Checks all of the files related to config and returns whether any of them has been modified since the configuration was created. +If config is NULL, the current configuration is used. @@ -@RET@ FcBool +@RET@ FcChar8 * @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 -is enabled. See also FcConfigEnableHome). +is enabled, and NULL otherwise. +See also FcConfigEnableHome). @@ -@RET@ FcBol +@RET@ FcBool @FUNC@ FcConfigEnableHome @TYPE1@ FcBool% @ARG1@ enable @PURPOSE@ controls use of the home directory. @@ -94,6 +110,7 @@ disabled. The previous setting of the value is returned. 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. +If config is NULL, the current configuration is used. @@ @RET@ FcStrList * @@ -103,6 +120,7 @@ Returns FcFalse if this operation runs out of memory. @DESC@ Returns the list of font directories specified in the configuration files for config. Does not include any subdirectories. +If config is NULL, the current configuration is used. @@ @RET@ FcStrList * @@ -113,6 +131,7 @@ for config. Does not include any subdirectories. Returns the list of font directories in config. This includes the configured font directories along with any directories below those in the filesystem. +If config is NULL, the current configuration is used. @@ @RET@ FcStrList * @@ -121,15 +140,16 @@ filesystem. @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. +If config is NULL, the current configuration is used. @@ -@RET@ char * +@RET@ FcChar8 * @FUNC@ FcConfigGetCache @TYPE1@ FcConfig * @ARG1@ config -@PURPOSE@ Get cache filename +@PURPOSE@ DEPRECATED used to return per-user cache filename @DESC@ -Returns the name of the file used to store per-user font information. +With fontconfig no longer using per-user cache files, this function now +simply returns NULL to indicate that no per-user file exists. @@ @RET@ FcStrList * @@ -140,6 +160,7 @@ Returns the name of the file used to store per-user font information. FcConfigGetCacheDirs returns a string list containing all of the directories that fontconfig will search when attempting to load a cache file for a font directory. +If config is NULL, the current configuration is used. @@ @RET@ FcFontSet * @@ -149,7 +170,9 @@ cache file for a font directory. @PURPOSE@ Get config font set @DESC@ Returns one of the two sets of fonts from the configuration as specified -by set. +by set. This font set is owned by the library and must +not be modified or freed. +If config is NULL, the current configuration is used. @@ @RET@ FcBlanks * @@ -159,6 +182,9 @@ by set. @DESC@ Returns the FcBlanks object associated with the given configuration, if no blanks were present in the configuration, this function will return 0. +The returned FcBlanks object if not NULL, is valid as long as the owning +FcConfig is alive. +If config is NULL, the current configuration is used. @@ @RET@ int @@ -169,6 +195,8 @@ blanks were present in the configuration, this function will return 0. 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. +An interval setting of zero disables automatic checks. +If config is NULL, the current configuration is used. @@ @RET@ FcBool @@ -177,26 +205,33 @@ a call to FcFontList when this interval has passed since the last check. @TYPE2@ int% @ARG2@ rescanInterval @PURPOSE@ Set config rescan interval @DESC@ -Sets the rescan interval; returns FcFalse if an error occurred. +Sets the rescan interval. Returns FcFalse if the interval cannot be set (due +to allocation failure). Otherwise returns FcTrue. +An interval setting of zero disables automatic checks. +If config is NULL, the current configuration is used. @@ @RET@ FcBool @FUNC@ FcConfigAppFontAddFile @TYPE1@ FcConfig * @ARG1@ config -@TYPE2@ const char * @ARG2@ file +@TYPE2@ const FcChar8 * @ARG2@ file @PURPOSE@ Add font file to font database @DESC@ -Adds an application-specific font to the configuration. +Adds an application-specific font to the configuration. Returns FcFalse +if the fonts cannot be added (due to allocation failure). Otherwise returns FcTrue. +If config is NULL, the current configuration is used. @@ @RET@ FcBool @FUNC@ FcConfigAppFontAddDir @TYPE1@ FcConfig * @ARG1@ config -@TYPE2@ const char * @ARG1@ dir +@TYPE2@ const FcChar8 * @ARG2@ 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. +application-specific set of fonts. Returns FcFalse +if the fonts cannot be added (due to allocation failure). Otherwise returns FcTrue. +If config is NULL, the current configuration is used. @@ @RET@ void @@ -205,6 +240,7 @@ application-specific set of fonts. @PURPOSE@ Remove all app fonts from font database @DESC@ Clears the set of application-specific fonts. +If config is NULL, the current configuration is used. @@ @RET@ FcBool @@ -218,7 +254,9 @@ Clears the set of application-specific fonts. 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. +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. +If config is NULL, the current configuration is used. @@ @RET@ FcBool @@ -228,7 +266,9 @@ p_pat is used for <test> elements with target=pattern. @TYPE3@ FcMatchKind% @ARG3@ kind @PURPOSE@ Execute substitutions @DESC@ -Calls FcConfigSubstituteWithPat setting p_pat to NULL. +Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns FcFalse +if the substitution cannot be performed (due to allocation failure). Otherwise returns FcTrue. +If config is NULL, the current configuration is used. @@ @RET@ FcPattern * @@ -238,9 +278,14 @@ Calls FcConfigSubstituteWithPat setting p_pat to NULL. @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. +Finds the font in sets most closely matching +pattern and returns the result of +FcFontRenderPrepare for that font and the provided +pattern. This function should be called only after +FcConfigSubstitute and +FcDefaultSubstitute have been called for +p; otherwise the results will not be correct. +If config is NULL, the current configuration is used. @@ @RET@ FcFontSet * @@ -262,9 +307,10 @@ been called for p; otherwise the results will not be corr 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. +FcFontRenderPrepare which combines them into a complete pattern. -The FcFontSet returned by FcFontSort is destroyed by caling FcFontSetDestroy. +The FcFontSet returned by FcFontSort is destroyed by calling FcFontSetDestroy. +If config is NULL, the current configuration is used. @@ @RET@ FcPattern * @@ -277,7 +323,7 @@ The FcFontSet returned by FcFontSort is destroyed by caling FcFontSetDestroy. 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. +FcConfigSubstituteWithPat with kind FcMatchFont and then returned. @@ @RET@ FcFontSet * @@ -289,11 +335,13 @@ FcConfigSubstitute with kind FcMatchFont and then returne @DESC@ Selects fonts matching p, creates patterns from those fonts containing only the objects in os and returns the set of unique such patterns. +If config is NULL, the default configuration is checked +to be up to date, and used. @@ -@RET@ char * +@RET@ FcChar8 * @FUNC@ FcConfigFilename -@TYPE1@ const char * @ARG1@ name +@TYPE1@ const FcChar8 * @ARG1@ name @PURPOSE@ Find a config file @DESC@ Given the specified external entity name, return the associated filename. @@ -318,6 +366,8 @@ FC_CONFIG_DIR environment variable. @DESC@ Walks the configuration in 'file' and constructs the internal representation in 'config'. Any include files referenced from within 'file' will be loaded -with FcConfigLoad and also parsed. If 'complain' is FcFalse, no warning -will be displayed if 'file' does not exist. +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. @@