[Tizen] Add codes for Dali Windows Backend
[platform/core/uifw/dali-adaptor.git] / dali / internal / text / text-abstraction / font-client-plugin-impl.cpp
old mode 100644 (file)
new mode 100755 (executable)
index 9b866ef..9079396
@@ -1095,7 +1095,7 @@ void FontClient::Plugin::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, boo
     if( FT_Err_Ok == error )
     {
       FT_Glyph glyph;
-
+#if defined(__GNUC__)
       if( softwareBold )
       {
         FT_GlyphSlot_Embolden(ftFace->glyph);
@@ -1107,7 +1107,7 @@ void FontClient::Plugin::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, boo
         FT_Matrix transform = {0x10000, FONT_SLANT_TANGENT, 0x00000, 0x10000};
         FT_Outline_Transform(&ftFace->glyph->outline, &transform);
       }
-
+#endif
       error = FT_Get_Glyph( ftFace->glyph, &glyph );
 
       // Convert to bitmap if necessary
@@ -1395,6 +1395,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 )
   {