From 425df4322773d5f95913814267b21a4745b660da Mon Sep 17 00:00:00 2001 From: Sungyeon Woo Date: Thu, 4 Apr 2013 11:02:04 +0900 Subject: [PATCH] bug fix for bidi cursor Change-Id: I389195cf33b93cb56b3aa6a9884c4d4807f04ac3 Signed-off-by: Sungyeon Woo --- src/graphics/FGrp_Font.cpp | 15 +++++++++++---- src/graphics/FGrp_FontFt2.cpp | 8 ++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/graphics/FGrp_Font.cpp b/src/graphics/FGrp_Font.cpp index 970baf0..cdb6357 100644 --- a/src/graphics/FGrp_Font.cpp +++ b/src/graphics/FGrp_Font.cpp @@ -1285,6 +1285,13 @@ _Font::__GetTextExtentList(const _Util::String& text, _Util::AccumList<_Util::Pa result _Font::__GetTextExtentList(_TextBidiPropertyWithReorder& bidiProperty, _Util::AccumList<_Util::Pair >& outList) const { + if (bidiProperty.length <= 0) + { + outList.Clear(); + + return E_SUCCESS; + } + _Util::AccumList<_Util::Pair > 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; diff --git a/src/graphics/FGrp_FontFt2.cpp b/src/graphics/FGrp_FontFt2.cpp index 4c1b9bd..42dc20c 100644 --- a/src/graphics/FGrp_FontFt2.cpp +++ b/src/graphics/FGrp_FontFt2.cpp @@ -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; } -- 2.7.4