*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <dali/devel-api/text-abstraction/segmentation.h>
#include <dali/devel-api/text-abstraction/shaping.h>
#include <dali/public-api/object/base-object.h>
#include <dali/devel-api/text-abstraction/segmentation.h>
#include <dali/devel-api/text-abstraction/shaping.h>
#include <dali/public-api/object/base-object.h>
- BidiInfoIndex CreateInfo( const Character* const paragraph, Length numberOfCharacters ){return 0;}
+ BidiInfoIndex CreateInfo( const Character* const paragraph, Length numberOfCharacters,
+ bool matchSystemLanguageDirection, LayoutDirection::Type layoutDirection ){return 0;}
void GetDescription( FontId id, FontDescription& fontDescription ){}
PointSize26Dot6 GetPointSize( FontId id ){return 9;}
FontId FindDefaultFont( Character charcode, PointSize26Dot6 pointSize, bool preferColor ){return 0;}
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 ){}
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 ){}
- 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;}
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;}
-inline static const TextAbstraction::Internal::FontClient& GetImplementation(const TextAbstraction::FontClient& fontClient)
-{
- DALI_ASSERT_ALWAYS( fontClient && "fontClient handle is empty" );
- const BaseObject& handle = fontClient.GetBaseObject();
- return static_cast<const TextAbstraction::Internal::FontClient&>(handle);
-}
-
inline static TextAbstraction::Internal::Shaping& GetImplementation(TextAbstraction::Shaping& shaping)
{
DALI_ASSERT_ALWAYS( shaping && "shaping handle is empty" );
inline static TextAbstraction::Internal::Shaping& GetImplementation(TextAbstraction::Shaping& shaping)
{
DALI_ASSERT_ALWAYS( shaping && "shaping handle is empty" );
-inline static const TextAbstraction::Internal::Shaping& GetImplementation(const TextAbstraction::Shaping& shaping)
-{
- DALI_ASSERT_ALWAYS( shaping && "shaping handle is empty" );
- const BaseObject& handle = shaping.GetBaseObject();
- return static_cast<const TextAbstraction::Internal::Shaping&>(handle);
-}
-
////////////////////////////////////////////////////////////////////////////////
/******************************************************************************/
////////////////////////////////////////////////////////////////////////////////
/******************************************************************************/
- Length numberOfCharacters )
+ Length numberOfCharacters,
+ bool matchSystemLanguageDirection,
+ LayoutDirection::Type layoutDirection )
- return GetImplementation( *this ).CreateInfo( paragraph, numberOfCharacters );
+ return GetImplementation( *this ).CreateInfo( paragraph, numberOfCharacters, matchSystemLanguageDirection, layoutDirection );
-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 )
}
FontId FontClient::GetFontId( const FontPath& path, PointSize26Dot6 pointSize, FaceIndex faceIndex )
-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 );