X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Ftext%2Ftext-abstraction%2Ffont-client-plugin-impl.cpp;h=9079396d9a98c0b71513c4a8229148daf8ae2d4e;hb=c1bb1606717a5a831a0e7bdaca8b4eb86dc5a89e;hp=8047822e4872191741557710c49346e2480377c2;hpb=c4099476531ecf2a0255125192de7dddf75e9ff9;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/text/text-abstraction/font-client-plugin-impl.cpp b/dali/internal/text/text-abstraction/font-client-plugin-impl.cpp old mode 100644 new mode 100755 index 8047822..9079396 --- a/dali/internal/text/text-abstraction/font-client-plugin-impl.cpp +++ b/dali/internal/text/text-abstraction/font-client-plugin-impl.cpp @@ -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 @@ -1283,6 +1283,12 @@ FT_FaceRec_* FontClient::Plugin::GetFreetypeFace( FontId fontId ) return fontFace; } +bool FontClient::Plugin::AddCustomFontDirectory( const FontPath& path ) +{ + // NULL as first parameter means the current configuration is used. + return FcConfigAppFontAddDir( NULL, reinterpret_cast( path.c_str() ) ); +} + void FontClient::Plugin::InitSystemFonts() { DALI_LOG_INFO( gLogFilter, Debug::General, "-->FontClient::Plugin::InitSystemFonts\n" ); @@ -1389,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( 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 ) {