When loading the default config file with FONTCONFIG_SYSROOT,
it fails if no /etc/fonts/fonts.conf is available, even if it is
there where is based on sysroot.
To address this, FcConfig is required to determine the sysroot.
therefore, this change makes FcConfigFilename() deprecated,
use FcConfigGetFilename() instead.
Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/181
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.
Trying to address what these configuration files really do.
This change allows to see the short description that mention
the purpose of the content in the config file and obtain
them through API.
This change also encourage one who want to make some UI for
the user-specific configuration management. it is the main
purpose of this change for me though.
Aside from that, I've also made programs translatable. so
we see more dependencies on the build time for gettext,
and itstool to generate PO from xml.
In 32ac7c75e8 the behavior of
FcConfigAppFontAddFile/Dir() were changed to return false
if not fonts were found. While this is welldefined and useful
for AddFile(), it's quite problematic for AddDir(). For example,
if the directory is empty, is that a failure or success? Worse,
the false value from AddDir() was being propagated all the way
to FcInit() returning false now. This only happened upon memory
allocation failure before, and some clients assert that FcInit()
is successful.
With this change, AddDir() is reverted back to what it was.
AddFont() change (which was actually in fcdir.c) from the original
commit is left in.
Version section was getting confused to the API's availability,
even though it was the version the doc was genereated.
So moving it into the footer and added @SINCE@ field in the data.
Add an ability to set the system root to generate the caches.
In order to do this, new APIs, FcConfigGetSysRoot() and
FcConfigSetSysRoot() is available.
Note that this also fixes a bug with FcFontList() where previously
it was NOT checking whether the config is up-to-date. May want to
keep the old behavior and document that ScanInterval is essentially
unused internally (FcFontSetList uses it, but we can remove that
too).
FcConfigUptoDate only checks whether files have been modified since the
configuration was created. Any changes to the configuration through the API
since then are not considered.