diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-12-06 08:59:16 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-12-06 13:20:59 +0000 |
commit | 645f8038df617275e65e05bba0b165a1c52ce59b (patch) | |
tree | 9f21c28a0313ea2934c68cbbd8f53d71de31a361 /vcl/unx | |
parent | b24dfa7ef93bc31ed9ccfb3e3472109bbd384b15 (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/fontmanager/fontconfig.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
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 |