[Fontconfig] Query for default config without force initialization if absent

Francesco Pretto ceztko at gmail.com
Fri Feb 11 14:28:47 UTC 2022


Hello,

I ask if it exists a function to query for the current default
configuration, without forcing its creation if it's found uninitialized.
All functions seems to do lazy initialize a default configuration,
including FcConfigGetCurrent[1]. Such function (tentative function name
FcConfigGetCurrentDirect) would be useful to determine the configuration
was already initialized or not and allow to set a custom default if no
existing configuration was found. A more sophisticated API could allow to
atomically set supplicated configuration as the default only if the latter
it's found uninitialized (tentative function name FcConfigTrySetCurrent),
flagging the caller if the the configuration was already initialized.

Regards,
Francesco

[1]
https://gitlab.freedesktop.org/fontconfig/fontconfig/-/blob/main/src/fccfg.c#L595
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/fontconfig/attachments/20220211/2ab920fc/attachment.htm>


More information about the Fontconfig mailing list