FcConfigCreate 3 Fontconfig &version; FcConfigCreate Create a configuration #include <fontconfig/fontconfig.h> FcConfig * FcConfigCreate void Description Creates an empty configuration. FcConfigReference 3 Fontconfig &version; FcConfigReference Increment config reference count #include <fontconfig/fontconfig.h> FcConfig * FcConfigReference FcConfig *config Description 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. FcConfigDestroy 3 Fontconfig &version; FcConfigDestroy Destroy a configuration #include <fontconfig/fontconfig.h> void FcConfigDestroy FcConfig *config Description 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. FcConfigSetCurrent 3 Fontconfig &version; FcConfigSetCurrent Set configuration as default #include <fontconfig/fontconfig.h> FcBool FcConfigSetCurrent FcConfig *config Description Sets the current default configuration to config. Implicitly calls FcConfigBuildFonts if necessary, returning FcFalse if that call fails. FcConfigGetCurrent 3 Fontconfig &version; FcConfigGetCurrent Return current configuration #include <fontconfig/fontconfig.h> FcConfig * FcConfigGetCurrent void Description Returns the current default configuration. FcConfigUptoDate 3 Fontconfig &version; FcConfigUptoDate Check timestamps on config files #include <fontconfig/fontconfig.h> FcBool FcConfigUptoDate FcConfig *config Description 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. FcConfigHome 3 Fontconfig &version; FcConfigHome return the current home directory. #include <fontconfig/fontconfig.h> FcChar8 * FcConfigHome void Description Return the current user's home directory, if it is available, and if using it is enabled, and NULL otherwise. See also FcConfigEnableHome). FcConfigEnableHome 3 Fontconfig &version; FcConfigEnableHome controls use of the home directory. #include <fontconfig/fontconfig.h> FcBool FcConfigEnableHome FcBool enable Description If enable 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 enable is FcFalse, then all use of the home directory in these contexts will be disabled. The previous setting of the value is returned. FcConfigBuildFonts 3 Fontconfig &version; FcConfigBuildFonts Build font database #include <fontconfig/fontconfig.h> FcBool FcConfigBuildFonts FcConfig *config Description 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. FcConfigGetConfigDirs 3 Fontconfig &version; FcConfigGetConfigDirs Get config directories #include <fontconfig/fontconfig.h> FcStrList * FcConfigGetConfigDirs FcConfig *config Description 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. FcConfigGetFontDirs 3 Fontconfig &version; FcConfigGetFontDirs Get font directories #include <fontconfig/fontconfig.h> FcStrList * FcConfigGetFontDirs FcConfig *config Description 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. FcConfigGetConfigFiles 3 Fontconfig &version; FcConfigGetConfigFiles Get config files #include <fontconfig/fontconfig.h> FcStrList * FcConfigGetConfigFiles FcConfig *config Description Returns the list of known configuration files used to generate config. If config is NULL, the current configuration is used. FcConfigGetCache 3 Fontconfig &version; FcConfigGetCache DEPRECATED used to return per-user cache filename #include <fontconfig/fontconfig.h> FcChar8 * FcConfigGetCache FcConfig *config Description With fontconfig no longer using per-user cache files, this function now simply returns NULL to indicate that no per-user file exists. FcConfigGetCacheDirs 3 Fontconfig &version; FcConfigGetCacheDirs return the list of directories searched for cache files #include <fontconfig/fontconfig.h> FcStrList * FcConfigGetCacheDirs const FcConfig *config Description 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. FcConfigGetFonts 3 Fontconfig &version; FcConfigGetFonts Get config font set #include <fontconfig/fontconfig.h> FcFontSet * FcConfigGetFonts FcConfig *config FcSetName set Description Returns one of the two sets of fonts from the configuration as specified 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. FcConfigGetBlanks 3 Fontconfig &version; FcConfigGetBlanks Get config blanks #include <fontconfig/fontconfig.h> FcBlanks * FcConfigGetBlanks FcConfig *config Description 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. FcConfigGetRescanInterval 3 Fontconfig &version; FcConfigGetRescanInterval Get config rescan interval #include <fontconfig/fontconfig.h> int FcConfigGetRescanInterval FcConfig *config Description 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. FcConfigSetRescanInterval 3 Fontconfig &version; FcConfigSetRescanInterval Set config rescan interval #include <fontconfig/fontconfig.h> FcBool FcConfigSetRescanInterval FcConfig *config int rescanInterval Description 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. FcConfigAppFontAddFile 3 Fontconfig &version; FcConfigAppFontAddFile Add font file to font database #include <fontconfig/fontconfig.h> FcBool FcConfigAppFontAddFile FcConfig *config const FcChar8 *file Description 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. FcConfigAppFontAddDir 3 Fontconfig &version; FcConfigAppFontAddDir Add fonts from directory to font database #include <fontconfig/fontconfig.h> FcBool FcConfigAppFontAddDir FcConfig *config const FcChar8 *dir Description 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 config is NULL, the current configuration is used. FcConfigAppFontClear 3 Fontconfig &version; FcConfigAppFontClear Remove all app fonts from font database #include <fontconfig/fontconfig.h> void FcConfigAppFontClear FcConfig *config Description Clears the set of application-specific fonts. If config is NULL, the current configuration is used. FcConfigSubstituteWithPat 3 Fontconfig &version; FcConfigSubstituteWithPat Execute substitutions #include <fontconfig/fontconfig.h> FcBool FcConfigSubstituteWithPat FcConfig *config FcPattern *p FcPattern *p_pat FcMatchKind kind Description 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. Returns FcFalse if the substitution cannot be performed (due to allocation failure). Otherwise returns FcTrue. If config is NULL, the current configuration is used. FcConfigSubstitute 3 Fontconfig &version; FcConfigSubstitute Execute substitutions #include <fontconfig/fontconfig.h> FcBool FcConfigSubstitute FcConfig *config FcPattern *p FcMatchKind kind Description 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. FcFontMatch 3 Fontconfig &version; FcFontMatch Return best font #include <fontconfig/fontconfig.h> FcPattern * FcFontMatch FcConfig *config FcPattern *p FcResult *result Description 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. FcFontSort 3 Fontconfig &version; FcFontSort Return list of matching fonts #include <fontconfig/fontconfig.h> FcFontSet * FcFontSort FcConfig *config FcPattern *p FcBool trim FcCharSet **csp FcResult *result Description 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. 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. The FcFontSet returned by FcFontSort is destroyed by calling FcFontSetDestroy. If config is NULL, the current configuration is used. FcFontRenderPrepare 3 Fontconfig &version; FcFontRenderPrepare Prepare pattern for loading font file #include <fontconfig/fontconfig.h> FcPattern * FcFontRenderPrepare FcConfig *config FcPattern *pat FcPattern *font Description 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 FcConfigSubstituteWithPat with kind FcMatchFont and then returned. FcFontList 3 Fontconfig &version; FcFontList List fonts #include <fontconfig/fontconfig.h> FcFontSet * FcFontList FcConfig *config FcPattern *p FcObjectSet *os Description 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. FcConfigFilename 3 Fontconfig &version; FcConfigFilename Find a config file #include <fontconfig/fontconfig.h> FcChar8 * FcConfigFilename const FcChar8 *name Description Given the specified external entity name, return the associated filename. This provides applications a way to convert various configuration file references into filename form. A null or empty name indicates that the default configuration file should be used; which file this references can be overridden with the FONTCONFIG_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 FONTCONFIG_PATH environment variable. FcConfigParseAndLoad 3 Fontconfig &version; FcConfigParseAndLoad load a configuration file #include <fontconfig/fontconfig.h> FcBool FcConfigParseAndLoad FcConfig *config const FcChar8 *file FcBool complain Description Walks the configuration in 'file' and constructs the internal representation in 'config'. Any include files referenced from within 'file' will be loaded 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. FcConfigGetSysRoot 3 Fontconfig &version; FcConfigGetSysRoot Obtain the system root directory #include <fontconfig/fontconfig.h> const FcChar8 * FcConfigGetSysRoot const FcConfig *config Description Obtrains the system root directory in 'config' if available. Since version 2.10.92 FcConfigSetSysRoot 3 Fontconfig &version; FcConfigSetSysRoot Set the system root directory #include <fontconfig/fontconfig.h> void FcConfigSetSysRoot FcConfig *config const FcChar8 *sysroot Description Set 'sysroot' as the system root directory. fontconfig prepend 'sysroot' to the cache directories in order to allow people to generate caches at the build time. Note that this causes changing current config. i.e. this function calls FcConfigSetCurrent() internally. Since version 2.10.92