[ooo-build-commit] .: vcl/unx

Caolán McNamara caolan at kemper.freedesktop.org
Thu Sep 30 12:23:03 PDT 2010


 vcl/unx/source/fontmanager/fontconfig.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit ef6a354c11e2e0499a8c9c4115c506d0aefd2865
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Sep 30 20:22:55 2010 +0100

    #i114703# better font-name localization, i.e. en fallback

diff --git a/vcl/unx/source/fontmanager/fontconfig.cxx b/vcl/unx/source/fontmanager/fontconfig.cxx
index 1208dcb..d572a4b 100644
--- a/vcl/unx/source/fontmanager/fontconfig.cxx
+++ b/vcl/unx/source/fontmanager/fontconfig.cxx
@@ -512,19 +512,24 @@ namespace
         for (std::vector<lang_and_family>::const_iterator aIter = families.begin(); aIter != aEnd; ++aIter)
         {
             const char *pLang = (const char*)aIter->first;
-            //perfect
             if( rtl_str_compare(pLang,sFullMatch.getStr() ) == 0)
             {
+                //perfect match
                 candidate = aIter->second;
                 break;
             }
             else if( (rtl_str_compare(pLang,sLangMatch.getStr()) == 0) && (!alreadyclosematch))
             {
+                //fairly close
                 candidate = aIter->second;
                 alreadyclosematch = true;
             }
+            else if( (rtl_str_compare(pLang,"en") == 0) && (!alreadyclosematch) )
+            {
+                //english name
+                candidate = aIter->second;
+            }
         }
-
         return candidate;
     }
 }


More information about the ooo-build-commit mailing list