[Linux/BSD] Add dynamically loaded library version checks.

This commit is contained in:
bruvzg 2023-03-16 10:44:47 +02:00
parent 161d028ae8
commit bed46f723c
No known key found for this signature in database
GPG key ID: 7960FCF39844EC38
9 changed files with 160 additions and 11 deletions

View file

@ -1102,6 +1102,16 @@ OS_LinuxBSD::OS_LinuxBSD() {
#else
font_config_initialized = true;
#endif
if (font_config_initialized) {
bool ver_ok = false;
int version = FcGetVersion();
ver_ok = ((version / 100 / 100) == 2 && (version / 100 % 100) >= 11) || ((version / 100 / 100) > 2); // 2.11.0
print_verbose(vformat("FontConfig %d.%d.%d detected.", version / 100 / 100, version / 100 % 100, version % 100));
if (!ver_ok) {
font_config_initialized = false;
}
}
if (font_config_initialized) {
config = FcInitLoadConfigAndFonts();
if (!config) {