#include <dali/public-api/common/intrusive-ptr.h>
#include <dali/devel-api/text-abstraction/font-client.h>
+// INTERNAL INCLUDES
+#include <dali-toolkit/internal/text/text-definitions.h>
+
namespace Dali
{
typedef IntrusivePtr<Metrics> MetricsPtr;
/**
- * @brief A wrapper around FontClient used to get metrics & potentially down-scaled Emoji metrics.
+ * @brief A wrapper around FontClient used to get metrics.
*/
class Metrics : public RefObject
{
}
/**
- * @brief Set the maximum Emoji size.
- *
- * @param[in] emojiSize Emoticons will be scaled to fit this size in pixels.
- */
- void SetMaxEmojiSize( int emojiSize )
- {
- mEmojiSize = emojiSize;
- }
-
- /**
- * @brief Get the maximum Emoji size.
+ * @brief Used to switch between bitmap & vector based glyphs
*
- * @return The maximum Emoji size.
+ * @param[in] glyphType The type of glyph; note that metrics for bitmap & vector based glyphs are different.
*/
- int GetMaxEmojiSize() const
+ void SetGlyphType( TextAbstraction::GlyphType glyphType )
{
- return mEmojiSize;
+ mGlyphType = glyphType;
}
/**
*/
void GetFontMetrics( FontId fontId, FontMetrics& metrics )
{
- mFontClient.GetFontMetrics( fontId, metrics, mEmojiSize ); // inline for performance
+ mFontClient.GetFontMetrics( fontId, metrics ); // inline for performance
}
/**
*/
bool GetGlyphMetrics( GlyphInfo* array, uint32_t size )
{
- return mFontClient.GetGlyphMetrics( array, size, true, mEmojiSize ); // inline for performance
+ return mFontClient.GetGlyphMetrics( array, size, mGlyphType, true ); // inline for performance
}
protected:
*/
Metrics( TextAbstraction::FontClient& fontClient )
: mFontClient( fontClient ),
- mEmojiSize( 0 )
- {
- }
+ mGlyphType( TextAbstraction::BITMAP_GLYPH )
+ {}
// Undefined
Metrics(const Metrics&);
private:
TextAbstraction::FontClient mFontClient;
-
- int mEmojiSize;
+ TextAbstraction::GlyphType mGlyphType;
};
} // namespace Text