]> git.wh0rd.org - fontconfig.git/blobdiff - doc/fcconfig.fncs
More doc typo fixes
[fontconfig.git] / doc / fcconfig.fncs
index 0360df93ad4b471be1c434e874e299b3fb5cc4bf..fb55adece1746c537459a07f207ed2e1b0e7e95d 100644 (file)
@@ -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
 Creates an empty configuration.
 @@
 
+@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.
+@@
+
 @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 <parameter>config</parameter> and returns
 whether any of them has been modified since the configuration was created.
+If <parameter>config</parameter> 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 <function>FcConfigEnableHome</function>).
+is enabled, and NULL otherwise.
+See also <function>FcConfigEnableHome</function>).
 @@
 
-@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 <parameter>config</parameter> 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 <parameter>config</parameter>.  Does not include any subdirectories.
+If <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcStrList *
@@ -113,6 +131,7 @@ for <parameter>config</parameter>.  Does not include any subdirectories.
 Returns the list of font directories in <parameter>config</parameter>. This includes the
 configured font directories along with any directories below those in the
 filesystem.
+If <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcStrList *
@@ -121,6 +140,7 @@ filesystem.
 @PURPOSE@      Get config files
 @DESC@
 Returns the list of known configuration files used to generate <parameter>config</parameter>.
+If <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcChar8 *
@@ -140,6 +160,7 @@ simply returns NULL to indicate that no per-user file exists.
 <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.
+If <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcFontSet *
@@ -150,7 +171,8 @@ cache file for a font directory.
 @DESC@
 Returns one of the two sets of fonts from the configuration as specified
 by <parameter>set</parameter>. This font set is owned by the library and must
-not be freed.
+not be modified or freed.
+If <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcBlanks *
@@ -160,6 +182,9 @@ not be freed.
 @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 <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           int
@@ -171,6 +196,7 @@ Returns the interval between automatic checks of the configuration (in
 seconds) specified in <parameter>config</parameter>.  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 <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcBool
@@ -182,6 +208,7 @@ An interval setting of zero disables automatic checks.
 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 <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcBool
@@ -192,6 +219,7 @@ An interval setting of zero disables automatic checks.
 @DESC@
 Adds an application-specific font to the configuration. Returns FcFalse
 if the fonts cannot be added (due to allocation failure). Otherwise returns FcTrue.
+If <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcBool
@@ -203,6 +231,7 @@ if the fonts cannot be added (due to allocation failure). Otherwise returns FcTr
 Scans the specified directory for fonts, adding each one found to the
 application-specific set of fonts. Returns FcFalse
 if the fonts cannot be added (due to allocation failure). Otherwise returns FcTrue.
+If <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           void
@@ -211,6 +240,7 @@ if the fonts cannot be added (due to allocation failure). Otherwise returns FcTr
 @PURPOSE@      Remove all app fonts from font database
 @DESC@
 Clears the set of application-specific fonts.
+If <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcBool
@@ -226,6 +256,7 @@ FcMatchPattern, then those tagged as pattern operations are applied, else
 if <parameter>kind</parameter> is FcMatchFont, those tagged as font operations are applied and
 p_pat is used for &lt;test&gt; elements with target=pattern. Returns FcFalse
 if the substitution cannot be performed (due to allocation failure). Otherwise returns FcTrue.
+If <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcBool
@@ -237,6 +268,7 @@ if the substitution cannot be performed (due to allocation failure). Otherwise r
 @DESC@
 Calls FcConfigSubstituteWithPat setting p_pat to NULL. Returns FcFalse
 if the substitution cannot be performed (due to allocation failure). Otherwise returns FcTrue.
+If <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcPattern *
@@ -253,6 +285,7 @@ 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.
+If <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcFontSet *
@@ -276,7 +309,8 @@ by the return value from multiple FcFontSort calls, applications must not
 modify these patterns.  Instead, they should be passed, along with <parameter>p</parameter> to
 <function>FcFontRenderPrepare</function> which combines them into a complete pattern.
     </para><para>
-The FcFontSet returned by FcFontSort is destroyed by caling FcFontSetDestroy.
+The FcFontSet returned by FcFontSort is destroyed by calling FcFontSetDestroy.
+If <parameter>config</parameter> is NULL, the current configuration is used.
 @@
 
 @RET@           FcPattern *
@@ -301,6 +335,8 @@ FcConfigSubstituteWithPat with <parameter>kind</parameter> FcMatchFont and then
 @DESC@
 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.
+If <parameter>config</parameter> is NULL, the default configuration is checked
+to be up to date, and used.
 @@
 
 @RET@           FcChar8 *