fixed bidi cache(for space)
authorSungyeon Woo <s.woo@samsung.com>
Wed, 26 Jun 2013 00:49:57 +0000 (09:49 +0900)
committerSungyeon Woo <s.woo@samsung.com>
Wed, 26 Jun 2013 01:56:15 +0000 (10:56 +0900)
Change-Id: I219928eabcafcdf0044ee402390da878ec9db6f5
Signed-off-by: Sungyeon Woo <s.woo@samsung.com>
src/graphics/FGrp_FontFt2.cpp

index 5e24d24..6ca3c5f 100644 (file)
@@ -469,6 +469,11 @@ _FontFt2::FindCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int st
 bool
 _FontFt2::AddCache(unsigned long glyphIndex, _Util::FixedPoint26_6 size, int style, Glyph* pGlyph)
 {
+       if (pGlyph->xAdvance == 0 && pGlyph->image.width == 0)
+       {
+               return false;
+       }
+
        return (__fontCache.get()) ? __fontCache->Add(glyphIndex, size, style, pGlyph) : false;
 }
 
@@ -928,7 +933,7 @@ _FontFt2::GetGlyphList(const _Util::String& reorderedText, Tizen::Base::Collecti
 
                // bidi cache underdevelop
                _IFont::Glyph* pFontGlyphData;
-/*
+
                bool rtn = FindCache(glyphIndex, __fontAttrib.size, __fontAttrib.style, &pFontGlyphData);
 
                if (rtn)
@@ -963,7 +968,7 @@ _FontFt2::GetGlyphList(const _Util::String& reorderedText, Tizen::Base::Collecti
 
                        continue;
                }
-*/
+
                if (isSynthetic)
                {
                        error = FT_Load_Glyph(pFace, glyphIndex, FT_LOAD_DEFAULT | FT_LOAD_NO_BITMAP);
@@ -1043,7 +1048,7 @@ _FontFt2::GetGlyphList(const _Util::String& reorderedText, Tizen::Base::Collecti
                pFontGlyphData->xOffset = _Util::FixedPoint22_10(pSlot->bitmap_left);
                pFontGlyphData->yOffset = _Util::FixedPoint22_10(pSlot->bitmap_top);
 
-               //AddCache(glyphIndex, __fontAttrib.size, __fontAttrib.style, pFontGlyphData);
+               AddCache(glyphIndex, __fontAttrib.size, __fontAttrib.style, pFontGlyphData);
 
                pFontGlyphData->hasOwnerShip = 1;
        }