12c393a42Smrg/* 2a6844aabSmrg * fontconfig/doc/fcconfig.fncs 32c393a42Smrg * 42c393a42Smrg * Copyright © 2003 Keith Packard 52c393a42Smrg * 62c393a42Smrg * Permission to use, copy, modify, distribute, and sell this software and its 72c393a42Smrg * documentation for any purpose is hereby granted without fee, provided that 82c393a42Smrg * the above copyright notice appear in all copies and that both that 92c393a42Smrg * copyright notice and this permission notice appear in supporting 10ca08ab68Smrg * documentation, and that the name of the author(s) not be used in 112c393a42Smrg * advertising or publicity pertaining to distribution of the software without 12ca08ab68Smrg * specific, written prior permission. The authors make no 132c393a42Smrg * representations about the suitability of this software for any purpose. It 142c393a42Smrg * is provided "as is" without express or implied warranty. 152c393a42Smrg * 16a6844aabSmrg * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 172c393a42Smrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 18a6844aabSmrg * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR 192c393a42Smrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 202c393a42Smrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 212c393a42Smrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 222c393a42Smrg * PERFORMANCE OF THIS SOFTWARE. 232c393a42Smrg */ 242c393a42Smrg@RET@ FcConfig * 252c393a42Smrg@FUNC@ FcConfigCreate 261cc69409Smrg@TYPE1@ void 271cc69409Smrg@PURPOSE@ Create a configuration 282c393a42Smrg@DESC@ 292c393a42SmrgCreates an empty configuration. 302c393a42Smrg@@ 312c393a42Smrg 32a6844aabSmrg@RET@ FcConfig * 33a6844aabSmrg@FUNC@ FcConfigReference 34a6844aabSmrg@TYPE1@ FcConfig * @ARG1@ config 351cc69409Smrg@PURPOSE@ Increment config reference count 36a6844aabSmrg@DESC@ 37a6844aabSmrgAdd another reference to <parameter>config</parameter>. Configs are freed only 38a6844aabSmrgwhen the reference count reaches zero. 39a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 40a6844aabSmrgIn that case this function will be similar to FcConfigGetCurrent() except that 41a6844aabSmrgit increments the reference count before returning and the user is responsible 42a6844aabSmrgfor destroying the configuration when not needed anymore. 43a6844aabSmrg@@ 44a6844aabSmrg 452c393a42Smrg@RET@ void 462c393a42Smrg@FUNC@ FcConfigDestroy 472c393a42Smrg@TYPE1@ FcConfig * @ARG1@ config 481cc69409Smrg@PURPOSE@ Destroy a configuration 492c393a42Smrg@DESC@ 50a6844aabSmrgDecrements the config reference count. If all references are gone, destroys 51a6844aabSmrgthe configuration and any data associated with it. 52a6844aabSmrgNote that calling this function with the return from FcConfigGetCurrent will 53a6844aabSmrgcause a new configuration to be created for use as current configuration. 542c393a42Smrg@@ 552c393a42Smrg 562c393a42Smrg@RET@ FcBool 572c393a42Smrg@FUNC@ FcConfigSetCurrent 582c393a42Smrg@TYPE1@ FcConfig * @ARG1@ config 591cc69409Smrg@PURPOSE@ Set configuration as default 602c393a42Smrg@DESC@ 612c393a42SmrgSets the current default configuration to <parameter>config</parameter>. Implicitly calls 62953daebaSmrgFcConfigBuildFonts if necessary, and FcConfigReference() to inrease the reference count 63953daebaSmrgin <parameter>config</parameter> since 2.12.0, returning FcFalse if that call fails. 642c393a42Smrg@@ 652c393a42Smrg 662c393a42Smrg@RET@ FcConfig * 672c393a42Smrg@FUNC@ FcConfigGetCurrent 681cc69409Smrg@TYPE1@ void 691cc69409Smrg@PURPOSE@ Return current configuration 702c393a42Smrg@DESC@ 712c393a42SmrgReturns the current default configuration. 722c393a42Smrg@@ 732c393a42Smrg 742c393a42Smrg@RET@ FcBool 752c393a42Smrg@FUNC@ FcConfigUptoDate 762c393a42Smrg@TYPE1@ FcConfig * @ARG1@ config 771cc69409Smrg@PURPOSE@ Check timestamps on config files 782c393a42Smrg@DESC@ 792c393a42SmrgChecks all of the files related to <parameter>config</parameter> and returns 802c393a42Smrgwhether any of them has been modified since the configuration was created. 81a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 822c393a42Smrg@@ 832c393a42Smrg 841cc69409Smrg@RET@ FcChar8 * 851cc69409Smrg@FUNC@ FcConfigHome 861cc69409Smrg@TYPE1@ void 871cc69409Smrg@PURPOSE@ return the current home directory. 882c393a42Smrg@DESC@ 892c393a42SmrgReturn the current user's home directory, if it is available, and if using it 90a6844aabSmrgis enabled, and NULL otherwise. 91a6844aabSmrgSee also <function>FcConfigEnableHome</function>). 922c393a42Smrg@@ 932c393a42Smrg 941cc69409Smrg@RET@ FcBool 951cc69409Smrg@FUNC@ FcConfigEnableHome 961cc69409Smrg@TYPE1@ FcBool% @ARG1@ enable 971cc69409Smrg@PURPOSE@ controls use of the home directory. 982c393a42Smrg@DESC@ 992c393a42SmrgIf <parameter>enable</parameter> is FcTrue, then Fontconfig will use various 1002c393a42Smrgfiles which are specified relative to the user's home directory (using the ~ 1012c393a42Smrgnotation in the configuration). When <parameter>enable</parameter> is 1022c393a42SmrgFcFalse, then all use of the home directory in these contexts will be 1032c393a42Smrgdisabled. The previous setting of the value is returned. 1042c393a42Smrg@@ 1052c393a42Smrg 1062c393a42Smrg@RET@ FcBool 1072c393a42Smrg@FUNC@ FcConfigBuildFonts 1082c393a42Smrg@TYPE1@ FcConfig * @ARG1@ config 1091cc69409Smrg@PURPOSE@ Build font database 1102c393a42Smrg@DESC@ 1112c393a42SmrgBuilds the set of available fonts for the given configuration. Note that 112ae02b298Smrgany changes to the configuration after this call (through 113ae02b298Smrg<function>FcConfigParseAndLoad</function> or 114ae02b298Smrg<function>FcConfigParseAndLoadFromMemory</function>) have indeterminate 115ae02b298Smrgeffects. (On the other hand, application fonts can still be modified 116ae02b298Smrgthrough <function>FcConfigAppFontAddFile</function>, 117ae02b298Smrg<function>FcConfigAppFontAddDir</function> and 118ae02b298Smrg<function>FcConfigAppFontClear</function>). Returns FcFalse if this operation 119ae02b298Smrgruns out of memory. If <parameter>config</parameter> is NULL, the current 120ae02b298Smrgconfiguration is used. 1212c393a42Smrg@@ 1222c393a42Smrg 1232c393a42Smrg@RET@ FcStrList * 1242c393a42Smrg@FUNC@ FcConfigGetConfigDirs 1252c393a42Smrg@TYPE1@ FcConfig * @ARG1@ config 1261cc69409Smrg@PURPOSE@ Get config directories 1272c393a42Smrg@DESC@ 1282c393a42SmrgReturns the list of font directories specified in the configuration files 1292c393a42Smrgfor <parameter>config</parameter>. Does not include any subdirectories. 130a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 1312c393a42Smrg@@ 1322c393a42Smrg 1332c393a42Smrg@RET@ FcStrList * 1342c393a42Smrg@FUNC@ FcConfigGetFontDirs 1352c393a42Smrg@TYPE1@ FcConfig * @ARG1@ config 1361cc69409Smrg@PURPOSE@ Get font directories 1372c393a42Smrg@DESC@ 1382c393a42SmrgReturns the list of font directories in <parameter>config</parameter>. This includes the 1392c393a42Smrgconfigured font directories along with any directories below those in the 1402c393a42Smrgfilesystem. 141a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 1422c393a42Smrg@@ 1432c393a42Smrg 1442c393a42Smrg@RET@ FcStrList * 1452c393a42Smrg@FUNC@ FcConfigGetConfigFiles 1462c393a42Smrg@TYPE1@ FcConfig * @ARG1@ config 1471cc69409Smrg@PURPOSE@ Get config files 1482c393a42Smrg@DESC@ 1492c393a42SmrgReturns the list of known configuration files used to generate <parameter>config</parameter>. 150a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 1512c393a42Smrg@@ 1522c393a42Smrg 1532c393a42Smrg@RET@ FcChar8 * 1542c393a42Smrg@FUNC@ FcConfigGetCache 1552c393a42Smrg@TYPE1@ FcConfig * @ARG1@ config 1561cc69409Smrg@PURPOSE@ DEPRECATED used to return per-user cache filename 1572c393a42Smrg@DESC@ 1582c393a42SmrgWith fontconfig no longer using per-user cache files, this function now 1592c393a42Smrgsimply returns NULL to indicate that no per-user file exists. 1602c393a42Smrg@@ 1612c393a42Smrg 1621cc69409Smrg@RET@ FcStrList * 1631cc69409Smrg@FUNC@ FcConfigGetCacheDirs 1641cc69409Smrg@TYPE1@ const FcConfig * @ARG1@ config 1651cc69409Smrg@PURPOSE@ return the list of directories searched for cache files 1662c393a42Smrg@DESC@ 1672c393a42Smrg<function>FcConfigGetCacheDirs</function> returns a string list containing 1682c393a42Smrgall of the directories that fontconfig will search when attempting to load a 1692c393a42Smrgcache file for a font directory. 170a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 1712c393a42Smrg@@ 1722c393a42Smrg 1732c393a42Smrg@RET@ FcFontSet * 1742c393a42Smrg@FUNC@ FcConfigGetFonts 1751cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 1761cc69409Smrg@TYPE2@ FcSetName% @ARG2@ set 1771cc69409Smrg@PURPOSE@ Get config font set 1782c393a42Smrg@DESC@ 1792c393a42SmrgReturns one of the two sets of fonts from the configuration as specified 1802c393a42Smrgby <parameter>set</parameter>. This font set is owned by the library and must 181a6844aabSmrgnot be modified or freed. 182a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 183a4e54154Smrg </para><para> 184a4e54154SmrgThis function isn't MT-safe. <function>FcConfigReference</function> must be called 185a4e54154Smrgbefore using this and then <function>FcConfigDestroy</function> when 186a4e54154Smrgthe return value is no longer referenced. 1872c393a42Smrg@@ 1882c393a42Smrg 1892c393a42Smrg@RET@ FcBlanks * 1902c393a42Smrg@FUNC@ FcConfigGetBlanks 1912c393a42Smrg@TYPE1@ FcConfig * @ARG1@ config 1921cc69409Smrg@PURPOSE@ Get config blanks 1932c393a42Smrg@DESC@ 194a32e9e42SmrgFcBlanks is deprecated. 195a32e9e42SmrgThis function always returns NULL. 1962c393a42Smrg@@ 1972c393a42Smrg 1982c393a42Smrg@RET@ int 1992c393a42Smrg@FUNC@ FcConfigGetRescanInterval 2002c393a42Smrg@TYPE1@ FcConfig * @ARG1@ config 2011cc69409Smrg@PURPOSE@ Get config rescan interval 2022c393a42Smrg@DESC@ 2032c393a42SmrgReturns the interval between automatic checks of the configuration (in 2042c393a42Smrgseconds) specified in <parameter>config</parameter>. The configuration is checked during 2052c393a42Smrga call to FcFontList when this interval has passed since the last check. 206a6844aabSmrgAn interval setting of zero disables automatic checks. 207a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 2082c393a42Smrg@@ 2092c393a42Smrg 2102c393a42Smrg@RET@ FcBool 2112c393a42Smrg@FUNC@ FcConfigSetRescanInterval 2121cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 2131cc69409Smrg@TYPE2@ int% @ARG2@ rescanInterval 2141cc69409Smrg@PURPOSE@ Set config rescan interval 2152c393a42Smrg@DESC@ 2162c393a42SmrgSets the rescan interval. Returns FcFalse if the interval cannot be set (due 2172c393a42Smrgto allocation failure). Otherwise returns FcTrue. 218a6844aabSmrgAn interval setting of zero disables automatic checks. 219a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 2202c393a42Smrg@@ 2212c393a42Smrg 2222c393a42Smrg@RET@ FcBool 2232c393a42Smrg@FUNC@ FcConfigAppFontAddFile 2241cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 2251cc69409Smrg@TYPE2@ const FcChar8 * @ARG2@ file 2261cc69409Smrg@PURPOSE@ Add font file to font database 2272c393a42Smrg@DESC@ 2282c393a42SmrgAdds an application-specific font to the configuration. Returns FcFalse 229953daebaSmrgif the fonts cannot be added (due to allocation failure or no fonts found). 230953daebaSmrgOtherwise returns FcTrue. If <parameter>config</parameter> is NULL, 231953daebaSmrgthe current configuration is used. 2322c393a42Smrg@@ 2332c393a42Smrg 2342c393a42Smrg@RET@ FcBool 2352c393a42Smrg@FUNC@ FcConfigAppFontAddDir 2361cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 2371cc69409Smrg@TYPE2@ const FcChar8 * @ARG2@ dir 2381cc69409Smrg@PURPOSE@ Add fonts from directory to font database 2392c393a42Smrg@DESC@ 2402c393a42SmrgScans the specified directory for fonts, adding each one found to the 2412c393a42Smrgapplication-specific set of fonts. Returns FcFalse 242953daebaSmrgif the fonts cannot be added (due to allocation failure). 243953daebaSmrgOtherwise returns FcTrue. If <parameter>config</parameter> is NULL, 244953daebaSmrgthe current configuration is used. 2452c393a42Smrg@@ 2462c393a42Smrg 2472c393a42Smrg@RET@ void 2482c393a42Smrg@FUNC@ FcConfigAppFontClear 2492c393a42Smrg@TYPE1@ FcConfig * @ARG1@ config 2501cc69409Smrg@PURPOSE@ Remove all app fonts from font database 2512c393a42Smrg@DESC@ 2522c393a42SmrgClears the set of application-specific fonts. 253a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 2542c393a42Smrg@@ 2552c393a42Smrg 2562c393a42Smrg@RET@ FcBool 2572c393a42Smrg@FUNC@ FcConfigSubstituteWithPat 2581cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 2591cc69409Smrg@TYPE2@ FcPattern * @ARG2@ p 2601cc69409Smrg@TYPE3@ FcPattern * @ARG3@ p_pat 2611cc69409Smrg@TYPE4@ FcMatchKind% @ARG4@ kind 2621cc69409Smrg@PURPOSE@ Execute substitutions 2632c393a42Smrg@DESC@ 2642c393a42SmrgPerforms the sequence of pattern modification operations, if <parameter>kind</parameter> is 2652c393a42SmrgFcMatchPattern, then those tagged as pattern operations are applied, else 2662c393a42Smrgif <parameter>kind</parameter> is FcMatchFont, those tagged as font operations are applied and 2672c393a42Smrgp_pat is used for <test> elements with target=pattern. Returns FcFalse 2682c393a42Smrgif the substitution cannot be performed (due to allocation failure). Otherwise returns FcTrue. 269a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 2702c393a42Smrg@@ 2712c393a42Smrg 2722c393a42Smrg@RET@ FcBool 2732c393a42Smrg@FUNC@ FcConfigSubstitute 2741cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 2751cc69409Smrg@TYPE2@ FcPattern * @ARG2@ p 2761cc69409Smrg@TYPE3@ FcMatchKind% @ARG3@ kind 2771cc69409Smrg@PURPOSE@ Execute substitutions 2782c393a42Smrg@DESC@ 2792c393a42SmrgCalls FcConfigSubstituteWithPat setting p_pat to NULL. Returns FcFalse 2802c393a42Smrgif the substitution cannot be performed (due to allocation failure). Otherwise returns FcTrue. 281a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 2822c393a42Smrg@@ 2832c393a42Smrg 2842c393a42Smrg@RET@ FcPattern * 2852c393a42Smrg@FUNC@ FcFontMatch 2861cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 2871cc69409Smrg@TYPE2@ FcPattern * @ARG2@ p 2881cc69409Smrg@TYPE3@ FcResult * @ARG3@ result 2891cc69409Smrg@PURPOSE@ Return best font 2902c393a42Smrg@DESC@ 2912c393a42SmrgFinds the font in <parameter>sets</parameter> most closely matching 2922c393a42Smrg<parameter>pattern</parameter> and returns the result of 2932c393a42Smrg<function>FcFontRenderPrepare</function> for that font and the provided 2942c393a42Smrgpattern. This function should be called only after 2952c393a42Smrg<function>FcConfigSubstitute</function> and 2962c393a42Smrg<function>FcDefaultSubstitute</function> have been called for 2972c393a42Smrg<parameter>p</parameter>; otherwise the results will not be correct. 298a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 2992c393a42Smrg@@ 3002c393a42Smrg 3012c393a42Smrg@RET@ FcFontSet * 3022c393a42Smrg@FUNC@ FcFontSort 3031cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 3041cc69409Smrg@TYPE2@ FcPattern * @ARG2@ p 3051cc69409Smrg@TYPE3@ FcBool% @ARG3@ trim 3061cc69409Smrg@TYPE4@ FcCharSet ** @ARG4@ csp 3071cc69409Smrg@TYPE5@ FcResult * @ARG5@ result 3081cc69409Smrg@PURPOSE@ Return list of matching fonts 3092c393a42Smrg@DESC@ 3102c393a42SmrgReturns the list of fonts sorted by closeness to <parameter>p</parameter>. If <parameter>trim</parameter> is FcTrue, 3112c393a42Smrgelements in the list which don't include Unicode coverage not provided by 3122c393a42Smrgearlier elements in the list are elided. The union of Unicode coverage of 3132c393a42Smrgall of the fonts is returned in <parameter>csp</parameter>, if <parameter>csp</parameter> is not NULL. This function 3142c393a42Smrgshould be called only after FcConfigSubstitute and FcDefaultSubstitute have 3152c393a42Smrgbeen called for <parameter>p</parameter>; otherwise the results will not be correct. 3162c393a42Smrg </para><para> 3172c393a42SmrgThe returned FcFontSet references FcPattern structures which may be shared 3182c393a42Smrgby the return value from multiple FcFontSort calls, applications must not 3192c393a42Smrgmodify these patterns. Instead, they should be passed, along with <parameter>p</parameter> to 3202c393a42Smrg<function>FcFontRenderPrepare</function> which combines them into a complete pattern. 3212c393a42Smrg </para><para> 322ca08ab68SmrgThe FcFontSet returned by FcFontSort is destroyed by calling FcFontSetDestroy. 323a6844aabSmrgIf <parameter>config</parameter> is NULL, the current configuration is used. 3242c393a42Smrg@@ 3252c393a42Smrg 3262c393a42Smrg@RET@ FcPattern * 3272c393a42Smrg@FUNC@ FcFontRenderPrepare 3281cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 3291cc69409Smrg@TYPE2@ FcPattern * @ARG2@ pat 3301cc69409Smrg@TYPE3@ FcPattern * @ARG3@ font 3311cc69409Smrg@PURPOSE@ Prepare pattern for loading font file 3322c393a42Smrg@DESC@ 3332c393a42SmrgCreates a new pattern consisting of elements of <parameter>font</parameter> not appearing 3342c393a42Smrgin <parameter>pat</parameter>, elements of <parameter>pat</parameter> not appearing in <parameter>font</parameter> and the best matching 3352c393a42Smrgvalue from <parameter>pat</parameter> for elements appearing in both. The result is passed to 336a6844aabSmrgFcConfigSubstituteWithPat with <parameter>kind</parameter> FcMatchFont and then returned. 3372c393a42Smrg@@ 3382c393a42Smrg 3392c393a42Smrg@RET@ FcFontSet * 3402c393a42Smrg@FUNC@ FcFontList 3411cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 3421cc69409Smrg@TYPE2@ FcPattern * @ARG2@ p 3431cc69409Smrg@TYPE3@ FcObjectSet * @ARG3@ os 3441cc69409Smrg@PURPOSE@ List fonts 3452c393a42Smrg@DESC@ 3462c393a42SmrgSelects fonts matching <parameter>p</parameter>, creates patterns from those fonts containing 3472c393a42Smrgonly the objects in <parameter>os</parameter> and returns the set of unique such patterns. 348a6844aabSmrgIf <parameter>config</parameter> is NULL, the default configuration is checked 349a6844aabSmrgto be up to date, and used. 3502c393a42Smrg@@ 3512c393a42Smrg 3522c393a42Smrg@RET@ FcChar8 * 3532c393a42Smrg@FUNC@ FcConfigFilename 3541cc69409Smrg@TYPE1@ const FcChar8 * @ARG1@ name 3551cc69409Smrg@PURPOSE@ Find a config file 3562c393a42Smrg@DESC@ 357a4e54154SmrgThis function is deprecated and is replaced by <function>FcConfigGetFilename</function>. 358a4e54154Smrg@@ 359a4e54154Smrg 360a4e54154Smrg@RET@ FcChar8 * 361a4e54154Smrg@FUNC@ FcConfigGetFilename 3621cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 3631cc69409Smrg@TYPE2@ const FcChar8 * @ARG2@ name 3641cc69409Smrg@PURPOSE@ Find a config file 365a4e54154Smrg@DESC@ 3662c393a42SmrgGiven the specified external entity name, return the associated filename. 3672c393a42SmrgThis provides applications a way to convert various configuration file 3682c393a42Smrgreferences into filename form. 3692c393a42Smrg </para><para> 3702c393a42SmrgA null or empty <parameter>name</parameter> indicates that the default configuration file should 3712c393a42Smrgbe used; which file this references can be overridden with the 372ca08ab68SmrgFONTCONFIG_FILE environment variable. Next, if the name starts with <parameter>~</parameter>, it 3732c393a42Smrgrefers to a file in the current users home directory. Otherwise if the name 3742c393a42Smrgdoesn't start with '/', it refers to a file in the default configuration 3752c393a42Smrgdirectory; the built-in default directory can be overridden with the 376ca08ab68SmrgFONTCONFIG_PATH environment variable. 377a4e54154Smrg </para><para> 378a4e54154SmrgThe result of this function is affected by the FONTCONFIG_SYSROOT environment variable or equivalent functionality. 3792c393a42Smrg@@ 3802c393a42Smrg 3811cc69409Smrg@RET@ FcBool 3821cc69409Smrg@FUNC@ FcConfigParseAndLoad 3831cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 3841cc69409Smrg@TYPE2@ const FcChar8 * @ARG2@ file 3851cc69409Smrg@TYPE3@ FcBool% @ARG3@ complain 3861cc69409Smrg@PURPOSE@ load a configuration file 3872c393a42Smrg@DESC@ 3882c393a42SmrgWalks the configuration in 'file' and constructs the internal representation 3892c393a42Smrgin 'config'. Any include files referenced from within 'file' will be loaded 3902c393a42Smrgand parsed. If 'complain' is FcFalse, no warning will be displayed if 3912c393a42Smrg'file' does not exist. Error and warning messages will be output to stderr. 3922c393a42SmrgReturns FcFalse if some error occurred while loading the file, either a 3932c393a42Smrgparse error, semantic error or allocation failure. Otherwise returns FcTrue. 394ae02b298Smrg 395ae02b298SmrgAfter all configuration files / strings have been loaded, with 396ae02b298Smrg<function>FcConfigParseAndLoad</function> and/or 397ae02b298Smrg<function>FcConfigParseAndLoadFromMemory</function>, call 398ae02b298Smrg<function>FcConfigBuildFonts</function> to build the font 399ae02b298Smrgdatabase. 4002c393a42Smrg@@ 401c9710b42Smrg 4021cc69409Smrg@RET@ FcBool 4031cc69409Smrg@FUNC@ FcConfigParseAndLoadFromMemory 4041cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 4051cc69409Smrg@TYPE2@ const FcChar8 * @ARG2@ buffer 4061cc69409Smrg@TYPE3@ FcBool% @ARG3@ complain 4071cc69409Smrg@PURPOSE@ load a configuration from memory 408a32e9e42Smrg@DESC@ 409a32e9e42SmrgWalks the configuration in 'memory' and constructs the internal representation 410a32e9e42Smrgin 'config'. Any includes files referenced from within 'memory' will be loaded 411a32e9e42Smrgand dparsed. If 'complain' is FcFalse, no warning will be displayed if 412a32e9e42Smrg'file' does not exist. Error and warning messages will be output to stderr. 413a32e9e42SmrgReturns FcFalse if fsome error occurred while loading the file, either a 414a32e9e42Smrgparse error, semantic error or allocation failure. Otherwise returns FcTrue. 415ae02b298Smrg 416ae02b298SmrgAfter all configuration files / strings have been loaded, with 417ae02b298Smrg<function>FcConfigParseAndLoad</function> and/or 418ae02b298Smrg<function>FcConfigParseAndLoadFromMemory</function>, call 419ae02b298Smrg<function>FcConfigBuildFonts</function> to build the font 420ae02b298Smrgdatabase. 4211cc69409Smrg@SINCE@ 2.12.5 422a32e9e42Smrg@@ 423a32e9e42Smrg 4241cc69409Smrg@RET@ const FcChar8 * 4251cc69409Smrg@FUNC@ FcConfigGetSysRoot 4261cc69409Smrg@TYPE1@ const FcConfig * @ARG1@ config 4271cc69409Smrg@PURPOSE@ Obtain the system root directory 428c9710b42Smrg@DESC@ 429a4e54154SmrgObtains the system root directory in 'config' if available. All files 430a4e54154Smrg(including file properties in patterns) obtained from this 'config' are 431a4e54154Smrgrelative to this system root directory. 432a4e54154Smrg </para><para> 433a4e54154SmrgThis function isn't MT-safe. <function>FcConfigReference</function> must be called 434a4e54154Smrgbefore using this and then <function>FcConfigDestroy</function> when 435a4e54154Smrgthe return value is no longer referenced. 4361cc69409Smrg@SINCE@ 2.10.92 437c9710b42Smrg@@ 438c9710b42Smrg 4391cc69409Smrg@RET@ void 4401cc69409Smrg@FUNC@ FcConfigSetSysRoot 4411cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 4421cc69409Smrg@TYPE2@ const FcChar8 * @ARG2@ sysroot 4431cc69409Smrg@PURPOSE@ Set the system root directory 444c9710b42Smrg@DESC@ 445a4e54154SmrgSet 'sysroot' as the system root directory. All file paths used or created with 446a4e54154Smrgthis 'config' (including file properties in patterns) will be considered or 447a4e54154Smrgmade relative to this 'sysroot'. This allows a host to generate caches for 448a4e54154Smrgtargets at build time. This also allows a cache to be re-targeted to a 449a4e54154Smrgdifferent base directory if 'FcConfigGetSysRoot' is used to resolve file paths. 450a4e54154SmrgWhen setting this on the current config this causes changing current config 451a4e54154Smrg(calls FcConfigSetCurrent()). 4521cc69409Smrg@SINCE@ 2.10.92 453c9710b42Smrg@@ 454c9710b42Smrg 4551cc69409Smrg@RET@ void 4561cc69409Smrg@FUNC@ FcConfigFileInfoIterInit 4571cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 4581cc69409Smrg@TYPE2@ FcConfigFileInfoIter * @ARG2@ iter 4591cc69409Smrg@PURPOSE@ Initialize the iterator 460a32e9e42Smrg@DESC@ 461a32e9e42SmrgInitialize 'iter' with the first iterator in the config file information list. 462a4e54154Smrg </para><para> 463a4e54154SmrgThe config file information list is stored in numerical order for filenames 464a4e54154Smrgi.e. how fontconfig actually read them. 465a4e54154Smrg </para><para> 466a4e54154SmrgThis function isn't MT-safe. <function>FcConfigReference</function> must be called 467a4e54154Smrgbefore using this and then <function>FcConfigDestroy</function> when the relevant 468a4e54154Smrgvalues are no longer referenced. 4691cc69409Smrg@SINCE@ 2.12.91 470a32e9e42Smrg@@ 471a32e9e42Smrg 4721cc69409Smrg@RET@ FcBool 4731cc69409Smrg@FUNC@ FcConfigFileInfoIterNext 4741cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 4751cc69409Smrg@TYPE2@ FcConfigFileInfoIter * @ARG2@ iter 4761cc69409Smrg@PURPOSE@ Set the iterator to point to the next list 477a32e9e42Smrg@DESC@ 478a32e9e42SmrgSet 'iter' to point to the next node in the config file information list. 479a32e9e42SmrgIf there is no next node, FcFalse is returned. 480a4e54154Smrg </para><para> 481a4e54154SmrgThis function isn't MT-safe. <function>FcConfigReference</function> must be called 482a4e54154Smrgbefore using <function>FcConfigFileInfoIterInit</function> and then 483a4e54154Smrg<function>FcConfigDestroy</function> when the relevant values are no longer referenced. 4841cc69409Smrg@SINCE@ 2.12.91 485a32e9e42Smrg@@ 486a32e9e42Smrg 4871cc69409Smrg@RET@ FcBool 4881cc69409Smrg@FUNC@ FcConfigFileInfoIterGet 4891cc69409Smrg@TYPE1@ FcConfig * @ARG1@ config 4901cc69409Smrg@TYPE2@ FcConfigFileInfoIter * @ARG2@ iter 4911cc69409Smrg@TYPE3@ FcChar8 ** @ARG3@ name 4921cc69409Smrg@TYPE4@ FcChar8 ** @ARG4@ description 4931cc69409Smrg@TYPE5@ FcBool * @ARG5@ enabled 4941cc69409Smrg@PURPOSE@ Obtain the configuration file information 495a32e9e42Smrg@DESC@ 496a32e9e42SmrgObtain the filename, the description and the flag whether it is enabled or not 497a32e9e42Smrgfor 'iter' where points to current configuration file information. 498a32e9e42SmrgIf the iterator is invalid, FcFalse is returned. 499a4e54154Smrg </para><para> 500a4e54154SmrgThis function isn't MT-safe. <function>FcConfigReference</function> must be called 501a4e54154Smrgbefore using <function>FcConfigFileInfoIterInit</function> and then 502a4e54154Smrg<function>FcConfigDestroy</function> when the relevant values are no longer referenced. 5031cc69409Smrg@SINCE@ 2.12.91 504a32e9e42Smrg@@ 505