X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Ftext%2Ftext-abstraction%2Fplugin%2Ffont-client-plugin-impl.cpp;h=56687185e90c2689cfcff2b2e5e471dda5f5d2ae;hb=d3d2ef191d689b9a819f9629d80cee4cb3817c65;hp=e438a53ed2af619942a58f8ad71e2923ec2b0323;hpb=c95ad6d50d9549451e01c351d8338d83a937d98a;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/text/text-abstraction/plugin/font-client-plugin-impl.cpp b/dali/internal/text/text-abstraction/plugin/font-client-plugin-impl.cpp index e438a53..5668718 100644 --- a/dali/internal/text/text-abstraction/plugin/font-client-plugin-impl.cpp +++ b/dali/internal/text/text-abstraction/plugin/font-client-plugin-impl.cpp @@ -1000,6 +1000,19 @@ GlyphIndex FontClient::Plugin::GetGlyphIndex(FontId fontId, return 0u; } +GlyphIndex FontClient::Plugin::GetGlyphIndex(FontId fontId, + Character charcode, + Character variantSelector) +{ + const FontCacheItemInterface* fontCacheItem = GetCachedFontItem(fontId); + if(fontCacheItem != nullptr) + { + return fontCacheItem->GetGlyphIndex(charcode, variantSelector); + } + + return 0u; +} + bool FontClient::Plugin::GetGlyphMetrics(GlyphInfo* array, uint32_t size, GlyphType type, @@ -1554,16 +1567,17 @@ FontId FontClient::Plugin::CreateFont(const FontPath& path, } else { + FT_Size_Metrics& ftMetrics = ftFace->size->metrics; + + FontMetrics metrics(static_cast(ftMetrics.ascender) * FROM_266, + static_cast(ftMetrics.descender) * FROM_266, + static_cast(ftMetrics.height) * FROM_266, + static_cast(ftFace->underline_position) * FROM_266, + static_cast(ftFace->underline_thickness) * FROM_266); + const float fixedWidth = static_cast(ftFace->available_sizes[fixedSizeIndex].width); const float fixedHeight = static_cast(ftFace->available_sizes[fixedSizeIndex].height); - // Indicate that the font is a fixed sized bitmap - FontMetrics metrics(fixedHeight, // The ascender in pixels. - 0.0f, - fixedHeight, // The height in pixels. - 0.0f, - 0.0f); - // Create the FreeType font face item to cache. FontFaceCacheItem fontFaceCacheItem(mFreeTypeLibrary, ftFace, path, requestedPointSize, faceIndex, metrics, fixedSizeIndex, fixedWidth, fixedHeight, hasColorTables);