X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-text-abstraction.cpp;h=df25aaa3be359bd59e3f8b5277b93dedd40508f8;hb=24ea337df1049251ab2e47c556edc6e8458f9c93;hp=63c89d3251d32c48dc68280e0137bd456b83ef14;hpb=81a7e08e1bcf2c17cb63921915bf13afc1b94d23;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp index 63c89d3..df25aaa 100644 --- a/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp +++ b/automated-tests/src/dali-toolkit/dali-toolkit-test-utils/toolkit-text-abstraction.cpp @@ -142,7 +142,7 @@ public: void GetDescription( FontId id, FontDescription& fontDescription ){} PointSize26Dot6 GetPointSize( FontId id ){return 9;} FontId FindDefaultFont( Character charcode, PointSize26Dot6 pointSize, bool preferColor ){return 0;} - FontId FindFallbackFont( FontId preferredFont, Character charcode, PointSize26Dot6 pointSize, bool preferColor ){return 0;} + FontId FindFallbackFont( Character charcode, const FontDescription& fontDescription, PointSize26Dot6 pointSize, bool preferColor ){return 0;} FontId GetFontId( const FontPath& path, PointSize26Dot6 pointSize, FaceIndex faceIndex ){return 0;} FontId GetFontId( const FontDescription& fontDescription,PointSize26Dot6 pointSize, FaceIndex faceIndex ){return 0;} bool IsScalable( const FontPath& path ){return true;} @@ -152,13 +152,15 @@ public: void GetFontMetrics( FontId fontId, FontMetrics& metrics ){} GlyphIndex GetGlyphIndex( FontId fontId, Character charcode ){return 0;} bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal ){return true;} - BufferImage CreateBitmap( FontId fontId, GlyphIndex glyphIndex ){return BufferImage();} + void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data ){} + PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex ){return PixelData();} void CreateVectorBlob( FontId fontId, GlyphIndex glyphIndex, VectorBlob*& blob, unsigned int& blobLength, unsigned int& nominalWidth, unsigned int& nominalHeight ) { blobLength = 0; } const GlyphInfo& GetEllipsisGlyph( PointSize26Dot6 pointSize ){return mGlyphInfo;} + bool IsColorGlyph( FontId fontId, GlyphIndex glyphIndex ){return false;} private: unsigned int mDpiHorizontal; unsigned int mDpiVertical; @@ -356,6 +358,14 @@ FontClient::FontClient( const FontClient& handle ) { } +FontClient::GlyphBufferData::GlyphBufferData() +{ +} + +FontClient::GlyphBufferData::~GlyphBufferData() +{ +} + FontClient& FontClient::operator=( const FontClient& handle ) { BaseHandle::operator=( handle ); @@ -407,9 +417,9 @@ FontId FontClient::FindDefaultFont( Character charcode, PointSize26Dot6 pointSiz return GetImplementation(*this).FindDefaultFont( charcode, pointSize, preferColor ); } -FontId FontClient::FindFallbackFont( FontId preferredFont, Character charcode, PointSize26Dot6 pointSize, bool preferColor ) +FontId FontClient::FindFallbackFont( Character charcode, const FontDescription& fontDescription, PointSize26Dot6 pointSize, bool preferColor ) { - return GetImplementation(*this).FindFallbackFont( preferredFont, charcode, pointSize, preferColor ); + return GetImplementation(*this).FindFallbackFont( charcode, fontDescription, pointSize, preferColor ); } FontId FontClient::GetFontId( const FontPath& path, PointSize26Dot6 pointSize, FaceIndex faceIndex ) @@ -462,11 +472,15 @@ bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType typ return GetImplementation(*this).GetGlyphMetrics( array, size, horizontal ); } -BufferImage FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex ) +void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, Dali::TextAbstraction::FontClient::GlyphBufferData& data ) { - return GetImplementation(*this).CreateBitmap( fontId, glyphIndex ); + GetImplementation(*this).CreateBitmap( fontId, glyphIndex, data ); } +PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex ) +{ + return GetImplementation(*this).CreateBitmap( fontId, glyphIndex ); +} void FontClient::CreateVectorBlob( FontId fontId, GlyphIndex glyphIndex, @@ -483,6 +497,11 @@ const GlyphInfo& FontClient::GetEllipsisGlyph( PointSize26Dot6 pointSize ) return GetImplementation(*this).GetEllipsisGlyph( pointSize ); } +bool FontClient::IsColorGlyph( FontId fontId, GlyphIndex glyphIndex ) +{ + return GetImplementation(*this).IsColorGlyph( fontId, glyphIndex ); +} + FontClient::FontClient( Internal::FontClient* internal ) : BaseHandle( internal ) {