From: Jinho, Lee Date: Wed, 20 Dec 2017 12:04:13 +0000 (+0900) Subject: Add locale property setting X-Git-Tag: dali_1.3.43~2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git;a=commitdiff_plain;h=e75ea438ff89a4bce81f5e5d0028ee23d5c73754 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 --- 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 ) {