[Tizen] Backport some font client issues
[platform/core/uifw/dali-adaptor.git] / dali / internal / text / text-abstraction / plugin / harfbuzz-proxy-font.cpp
index 5d62a95..02b9691 100644 (file)
@@ -76,7 +76,7 @@ private:
 
 public:
   FT_Face            mFreeTypeFace;      ///< The FreeType face. Owned from font-face-cache-item.
-  GlyphCacheManager* mGlyphCacheManager; ///< Glyph caching system for this harfbuzz font. Owned from font-face-cache-item.
+  GlyphCacheManager* mGlyphCacheManager; ///< Glyph caching system for this harfbuzz font. Owned from font-client-plugin-cache-handler.
 
   hb_font_t* mHarfBuzzFont; ///< Harfbuzz font handle integrated with FT_Face.
 };
@@ -126,7 +126,7 @@ static bool GetGlyphCacheData(void* font_data, const GlyphIndex& glyphIndex, Gly
   if(DALI_LIKELY(impl && impl->mGlyphCacheManager))
   {
     FT_Error error;
-    return impl->mGlyphCacheManager->GetGlyphCacheDataFromIndex(glyphIndex, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING, false, glyphData, error);
+    return impl->mGlyphCacheManager->GetGlyphCacheDataFromIndex(impl->mFreeTypeFace, glyphIndex, FT_LOAD_DEFAULT | FT_LOAD_NO_HINTING, false, glyphData, error);
   }
   return false;
 }
@@ -344,7 +344,7 @@ static hb_bool_t GlyphExtentsFunc(hb_font_t* font, void* font_data, hb_codepoint
 {
   // Output data stored here.
   GlyphCacheManager::GlyphCacheData glyphData;
-  if(!GetGlyphCacheData(font_data, static_cast<GlyphIndex>(glyphIndex), glyphData))
+  if(GetGlyphCacheData(font_data, static_cast<GlyphIndex>(glyphIndex), glyphData))
   {
     extents->x_bearing = glyphData.mGlyphMetrics.horiBearingX;
     extents->y_bearing = glyphData.mGlyphMetrics.horiBearingY;