From e75ea438ff89a4bce81f5e5d0028ee23d5c73754 Mon Sep 17 00:00:00 2001 From: "Jinho, Lee" Date: Wed, 20 Dec 2017 21:04:13 +0900 Subject: [PATCH] Add locale property setting In the font-config of the TV, the priority is generally set in the order of Korean -> Chinese font, but in the case of zh_CN, the priority is set to Chinese -> Korean. In the case of EFL and Clutter, font preference policy in Font-Config is read according to setlocale information when setting font-family. This part is missing in DALi. Change-Id: I8d346eed5f7935f57c6c3267ef9e7b6c164fe516 --- dali/internal/text/text-abstraction/font-client-plugin-impl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dali/internal/text/text-abstraction/font-client-plugin-impl.cpp b/dali/internal/text/text-abstraction/font-client-plugin-impl.cpp index 8047822..bd4c599 100644 --- a/dali/internal/text/text-abstraction/font-client-plugin-impl.cpp +++ b/dali/internal/text/text-abstraction/font-client-plugin-impl.cpp @@ -1389,6 +1389,13 @@ FcPattern* FontClient::Plugin::CreateFontFamilyPattern( const FontDescription& f // add a property to the pattern for the font family FcPatternAddString( fontFamilyPattern, FC_FAMILY, reinterpret_cast( fontDescription.family.c_str() ) ); + // add a property to the pattern for local setting. + const char* locale = setlocale( LC_MESSAGES, NULL ); + if( locale != NULL) + { + FcPatternAddString( fontFamilyPattern, FC_LANG, reinterpret_cast( locale ) ); + } + int width = FONT_WIDTH_TYPE_TO_INT[fontDescription.width]; if( width < 0 ) { -- 2.7.4