[4.0] Add locale property setting 10/164710/2
authorJinho, Lee <jeano.lee@samsung.com>
Wed, 20 Dec 2017 12:04:13 +0000 (21:04 +0900)
committerJinho, Lee <jeano.lee@samsung.com>
Fri, 22 Dec 2017 04:59:58 +0000 (13:59 +0900)
Change-Id: I8d346eed5f7935f57c6c3267ef9e7b6c164fe516

text/dali/internal/text-abstraction/font-client-plugin-impl.cpp

index 28750e0..5edf88d 100644 (file)
@@ -1386,6 +1386,13 @@ FcPattern* FontClient::Plugin::CreateFontFamilyPattern( const FontDescription& f
   // add a property to the pattern for the font family
   FcPatternAddString( fontFamilyPattern, FC_FAMILY, reinterpret_cast<const FcChar8*>( 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<const FcChar8*>( locale ) );
+  }
+
   int width = FONT_WIDTH_TYPE_TO_INT[fontDescription.width];
   if( width < 0 )
   {