vcl/unx/generic/fontmanager/fontconfig.cxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
New commits: commit 645f8038df617275e65e05bba0b165a1c52ce59b Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Tue Dec 6 08:59:16 2022 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Tue Dec 6 13:20:59 2022 +0000 Resolves: tdf#151722 use UI Language for localized font names instead of system locale Change-Id: Ie1f33644fcb8529b237db372b7d8daea19af8ede Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143706 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index 33a90812ddcb..ac747bd71aef 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -54,6 +54,7 @@ using namespace psp; #include <cstdio> #include <unotools/configmgr.hxx> +#include <unotools/syslocaleoptions.hxx> #include <osl/process.h> @@ -442,13 +443,9 @@ FcResult FontCfgWrapper::LocalizedElementFromPattern(FcPattern const * pPattern, ++k; } - //possible to-do, sort by UILocale instead of process locale if (!m_pLanguageTag) - { - rtl_Locale* pLoc = nullptr; - osl_getProcessLocale(&pLoc); - m_pLanguageTag.reset( new LanguageTag(*pLoc) ); - } + m_pLanguageTag.reset(new LanguageTag(SvtSysLocaleOptions().GetRealUILanguageTag())); + *element = bestname(lang_and_elements, *m_pLanguageTag); //if this element is a fontname, map the other names to this best-name