doc/fcconfig.fncs | 15 ++++++++++----- doc/fontconfig-devel.sgml | 1 + 2 files changed, 11 insertions(+), 5 deletions(-) New commits: commit 40e27f5d989ef4e40d218624de0a51de3de43177 Author: Ben Wagner <bungeman@xxxxxxxxxxxx> Date: Tue Feb 19 00:40:32 2019 +0000 Better document sysroot. All non trivial users of FontConfig must use FcConfigGetSysRoot to resolve file properties in patterns. In order to support sysroot the filename in the file property must be relative to the sysroot, but the value of the file property in a pattern is directly exposed, making it impossible for FontConfig to resolve the filename itself transparently. diff --git a/doc/fcconfig.fncs b/doc/fcconfig.fncs index de7a5d7..5f1ef43 100644 --- a/doc/fcconfig.fncs +++ b/doc/fcconfig.fncs @@ -393,7 +393,9 @@ parse error, semantic error or allocation failure. Otherwise returns FcTrue. @TYPE1@ const FcConfig * @ARG1@ config @PURPOSE@ Obtain the system root directory @DESC@ -Obtrains the system root directory in 'config' if available. +Obtains the system root directory in 'config' if available. All files +(including file properties in patterns) obtained from this 'config' are +relative to this system root directory. @SINCE@ 2.10.92 @@ @@ -403,10 +405,13 @@ Obtrains the system root directory in 'config' if available. @TYPE2@ const FcChar8 * @ARG2@ sysroot @PURPOSE@ Set the system root directory @DESC@ -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. +Set 'sysroot' as the system root directory. All file paths used or created with +this 'config' (including file properties in patterns) will be considered or +made relative to this 'sysroot'. This allows a host to generate caches for +targets at build time. This also allows a cache to be re-targeted to a +different base directory if 'FcConfigGetSysRoot' is used to resolve file paths. +When setting this on the current config this causes changing current config +(calls FcConfigSetCurrent()). @SINCE@ 2.10.92 @@ diff --git a/doc/fontconfig-devel.sgml b/doc/fontconfig-devel.sgml index 6a6caef..b8b232c 100644 --- a/doc/fontconfig-devel.sgml +++ b/doc/fontconfig-devel.sgml @@ -168,6 +168,7 @@ convenience for the application's rendering mechanism. normal hinter globaladvance FC_GLOBAL_ADVANCE Bool Use font global advance data (deprecated) file FC_FILE String The filename holding the font + relative to the config's sysroot index FC_INDEX Int The index of the font within the file ftface FC_FT_FACE FT_Face Use the specified FreeType _______________________________________________ Fontconfig mailing list Fontconfig@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/fontconfig