bug fix for bidi cursor
authorSungyeon Woo <s.woo@samsung.com>
Thu, 4 Apr 2013 02:02:04 +0000 (11:02 +0900)
committerSungyeon Woo <s.woo@samsung.com>
Thu, 4 Apr 2013 02:02:04 +0000 (11:02 +0900)
Change-Id: I389195cf33b93cb56b3aa6a9884c4d4807f04ac3
Signed-off-by: Sungyeon Woo <s.woo@samsung.com>
src/graphics/FGrp_Font.cpp
src/graphics/FGrp_FontFt2.cpp

index 970baf0..cdb6357 100644 (file)
@@ -1285,6 +1285,13 @@ _Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pa
 result
 _Font::__GetTextExtentList(_TextBidiPropertyWithReorder& bidiProperty, _Util::AccumList<_Util::Pair<int, int> >& outList) const
 {
+       if (bidiProperty.length <= 0)
+       {
+               outList.Clear();
+
+               return E_SUCCESS;
+       }
+
        _Util::AccumList<_Util::Pair<int, int> > tempList;
 
        {
@@ -1380,10 +1387,10 @@ _Font::__GetTextExtentList(_TextBidiPropertyWithReorder& bidiProperty, _Util::Ac
                                glyphList.GetAt(i, pGlyph);
 
                                // bug fixed in test case of L"\x9a8\x20\x981\x9a0\x635"
-                               if (pGlyph->xAdvance == 0 && pGlyph->image.width == 0)
-                               {
-                                       continue;
-                               }
+                               //if (pGlyph->xAdvance == 0 && pGlyph->image.width == 0)
+                               //{
+                               //      continue;
+                               //}
 
                                int prevX = xDest;
 
index 4c1b9bd..42dc20c 100644 (file)
@@ -918,6 +918,14 @@ _FontFt2::GetGlyphList(const _Util::String& reorderedText, Tizen::Base::Collecti
 
                if (!auxInfo.isAvailable)
                {
+                       char* pFontGlyphData = new (std::nothrow) char[sizeof(_IFont::Glyph)];
+
+                       if (pFontGlyphData)
+                       {
+                               memset(pFontGlyphData, 0, sizeof(_IFont::Glyph));
+                               out.Add((_IFont::Glyph*) pFontGlyphData);
+                       }
+
                        continue;
                }