vcl/unx/generic/fontmanager/fontconfig.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit ef557f0742b6111827982f5e10bc2f44fb553f78
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Dec 6 08:59:16 2022 +0000
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Wed Dec 7 04:21:34 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/+/143593
    Tested-by: Jenkins
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx 
b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 1daf54b69fa6..c44cdd2ee05f 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>
 
@@ -440,13 +441,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

Reply via email to