From f249715db329414339d964e0beb8ea1f97da2f6e Mon Sep 17 00:00:00 2001 From: PeterN Date: Tue, 6 Jun 2023 23:38:11 +0100 Subject: [PATCH] Fix #10964: Missing FontConfig format for language. (#10965) --- src/os/unix/font_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/unix/font_unix.cpp b/src/os/unix/font_unix.cpp index cd428b8d33..0175b77f35 100644 --- a/src/os/unix/font_unix.cpp +++ b/src/os/unix/font_unix.cpp @@ -107,7 +107,7 @@ bool SetFallbackFont(FontCacheSettings *settings, const std::string &language_is /* Fontconfig doesn't handle full language isocodes, only the part * before the _ of e.g. en_GB is used, so "remove" everything after * the _. */ - std::string lang = language_isocode.substr(0, language_isocode.find('_')); + std::string lang = fmt::format(":lang={}", language_isocode.substr(0, language_isocode.find('_'))); /* First create a pattern to match the wanted language. */ FcPattern *pat = FcNameParse((const FcChar8 *)lang.c_str());