X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=automated-tests%2Fsrc%2Fdali-toolkit%2Fdali-toolkit-test-utils%2Ftoolkit-text-abstraction.cpp;h=75312ef46cc26c7c81a3e6f127b63894e2cb25a2;hp=cd0c19d1599844a2a54ce8a58b0b513cba938425;hb=3fe7030fe503879c909bf28c4a953fd19fee2a3b;hpb=10213ff7b9185fbb7fd444c72c12dd4595b35204 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 old mode 100644 new mode 100755 index cd0c19d..75312ef --- 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,23 +142,25 @@ 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;} bool IsScalable( const FontDescription& fontDescription ){return true;} void GetFixedSizes( const FontPath& path, Dali::Vector< PointSize26Dot6>& sizes ){} void GetFixedSizes( const FontDescription& fontDescription, Dali::Vector< PointSize26Dot6 >& sizes ){} - void GetFontMetrics( FontId fontId, FontMetrics& metrics, int desiredFixedSize ){} + void GetFontMetrics( FontId fontId, FontMetrics& metrics ){} GlyphIndex GetGlyphIndex( FontId fontId, Character charcode ){return 0;} - bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal, int desiredFixedSize ){return true;} - BufferImage CreateBitmap( FontId fontId, GlyphIndex glyphIndex ){return BufferImage();} + bool GetGlyphMetrics( GlyphInfo* array, uint32_t size, bool horizontal ){return true;} + void CreateBitmap( FontId fontId, GlyphIndex glyphIndex, bool softwareItailc, bool softwareBold, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth ){} + PixelData CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth ){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 ) @@ -447,9 +457,9 @@ void FontClient::GetFixedSizes( const FontDescription& fontDescription, GetImplementation(*this).GetFixedSizes( fontDescription, sizes ); } -void FontClient::GetFontMetrics( FontId fontId, FontMetrics& metrics, int desiredFixedSize ) +void FontClient::GetFontMetrics( FontId fontId, FontMetrics& metrics ) { - GetImplementation(*this).GetFontMetrics( fontId, metrics, desiredFixedSize ); + GetImplementation(*this).GetFontMetrics( fontId, metrics ); } GlyphIndex FontClient::GetGlyphIndex( FontId fontId, Character charcode ) @@ -457,16 +467,20 @@ GlyphIndex FontClient::GetGlyphIndex( FontId fontId, Character charcode ) return GetImplementation(*this).GetGlyphIndex( fontId, charcode ); } -bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType type, bool horizontal, int desiredFixedSize ) +bool FontClient::GetGlyphMetrics( GlyphInfo* array, uint32_t size, GlyphType type, bool horizontal ) { - return GetImplementation(*this).GetGlyphMetrics( array, size, horizontal, desiredFixedSize ); + return GetImplementation(*this).GetGlyphMetrics( array, size, horizontal ); } -BufferImage FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex ) +void FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, bool softwareItailc, bool softwareBold, Dali::TextAbstraction::FontClient::GlyphBufferData& data, int outlineWidth ) { - return GetImplementation(*this).CreateBitmap( fontId, glyphIndex ); + GetImplementation(*this).CreateBitmap( fontId, glyphIndex, softwareItailc, softwareBold, data, outlineWidth ); } +PixelData FontClient::CreateBitmap( FontId fontId, GlyphIndex glyphIndex, int outlineWidth ) +{ + return GetImplementation(*this).CreateBitmap( fontId, glyphIndex, outlineWidth ); +} 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 ) {