FcConfigCreate 3 FcConfigCreate Create a configuration #include <fontconfig/fontconfig.h> FcConfig * FcConfigCreate void Description Creates an empty configuration. Version Fontconfig version &version; FcConfigReference 3 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. Version Fontconfig version &version; FcConfigDestroy 3 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. Version Fontconfig version &version; FcConfigSetCurrent 3 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. Version Fontconfig version &version; FcConfigGetCurrent 3 FcConfigGetCurrent Return current configuration #include <fontconfig/fontconfig.h> FcConfig * FcConfigGetCurrent void Description Returns the current default configuration. Version Fontconfig version &version; FcConfigUptoDate 3 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. Version Fontconfig version &version; FcConfigHome 3 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). Version Fontconfig version &version; FcConfigEnableHome 3 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. Version Fontconfig version &version; FcConfigBuildFonts 3 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. Version Fontconfig version &version; FcConfigGetConfigDirs 3 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. Version Fontconfig version &version; FcConfigGetFontDirs 3 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. Version Fontconfig version &version; FcConfigGetConfigFiles 3 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. Version Fontconfig version &version; FcConfigGetCache 3 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. Version Fontconfig version &version; FcConfigGetCacheDirs 3 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. Version Fontconfig version &version; FcConfigGetFonts 3 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. Version Fontconfig version &version; FcConfigGetBlanks 3 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. Version Fontconfig version &version; FcConfigGetRescanInterval 3 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. Version Fontconfig version &version; FcConfigSetRescanInterval 3 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. Version Fontconfig version &version; FcConfigAppFontAddFile 3 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. Version Fontconfig version &version; FcConfigAppFontAddDir 3 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. Version Fontconfig version &version; FcConfigAppFontClear 3 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. Version Fontconfig version &version; FcConfigSubstituteWithPat 3 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. Version Fontconfig version &version; FcConfigSubstitute 3 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. Version Fontconfig version &version; FcFontMatch 3 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. Version Fontconfig version &version; FcFontSort 3 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. Version Fontconfig version &version; FcFontRenderPrepare 3 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. Version Fontconfig version &version; FcFontList 3 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. Version Fontconfig version &version; FcConfigFilename 3 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. Version Fontconfig version &version; FcConfigParseAndLoad 3 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. Version Fontconfig version &version;