From adb5a0568b609bc54eb263b302f103ff81556245 Mon Sep 17 00:00:00 2001 From: Sungyeon Woo Date: Wed, 26 Jun 2013 09:49:57 +0900 Subject: [PATCH] fixed bidi cache(for space) Change-Id: I219928eabcafcdf0044ee402390da878ec9db6f5 Signed-off-by: Sungyeon Woo --- src/graphics/FGrp_FontFt2.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/graphics/FGrp_FontFt2.cpp b/src/graphics/FGrp_FontFt2.cpp index 5e24d24..6ca3c5f 100644 --- a/src/graphics/FGrp_FontFt2.cpp +++ b/src/graphics/FGrp_FontFt2.cpp @@ -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; } -- 2.7.4