mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
font: log fontconfig/freetype version when debug logging has been enabled
This commit is contained in:
parent
3df292a944
commit
f0ad3d3afc
1 changed files with 20 additions and 0 deletions
20
font.c
20
font.c
|
|
@ -35,6 +35,26 @@ init(void)
|
|||
FcInit();
|
||||
FT_Init_FreeType(&ft_lib);
|
||||
mtx_init(&ft_lock, mtx_plain);
|
||||
|
||||
#if defined(LOG_ENABLE_DBG) && LOG_ENABLE_DBG
|
||||
{
|
||||
int raw_version = FcGetVersion();
|
||||
|
||||
/* See FC_VERSION in <fontconfig/fontconfig.h> */
|
||||
const int major = raw_version / 10000; raw_version %= 10000;
|
||||
const int minor = raw_version / 100; raw_version %= 100;
|
||||
const int patch = raw_version;
|
||||
|
||||
LOG_DBG("fontconfig: %d.%d.%d", major, minor, patch);
|
||||
}
|
||||
|
||||
{
|
||||
int major, minor, patch;
|
||||
FT_Library_Version(ft_lib, &major, &minor, &patch);
|
||||
LOG_DBG("freetype: %d.%d.%d", major, minor, patch);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
static void __attribute__((destructor))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue