projects
/
platform
/
core
/
uifw
/
dali-toolkit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Visuals devel API migrated to public
[platform/core/uifw/dali-toolkit.git]
/
dali-toolkit
/
internal
/
text
/
metrics.h
diff --git
a/dali-toolkit/internal/text/metrics.h
b/dali-toolkit/internal/text/metrics.h
index
147ae79
..
ad4ed41
100644
(file)
--- a/
dali-toolkit/internal/text/metrics.h
+++ b/
dali-toolkit/internal/text/metrics.h
@@
-22,6
+22,9
@@
#include <dali/public-api/common/intrusive-ptr.h>
#include <dali/devel-api/text-abstraction/font-client.h>
#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
{
namespace Dali
{
@@
-35,7
+38,7
@@
class Metrics;
typedef IntrusivePtr<Metrics> MetricsPtr;
/**
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
{
*/
class Metrics : public RefObject
{
@@
-50,23
+53,13
@@
public:
}
/**
}
/**
- * @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 mEmojiSiz
e;
+
mGlyphType = glyphTyp
e;
}
/**
}
/**
@@
-77,7
+70,7
@@
public:
*/
void GetFontMetrics( FontId fontId, FontMetrics& metrics )
{
*/
void GetFontMetrics( FontId fontId, FontMetrics& metrics )
{
- mFontClient.GetFontMetrics( fontId, metrics
, mEmojiSize
); // inline for performance
+ mFontClient.GetFontMetrics( fontId, metrics ); // inline for performance
}
/**
}
/**
@@
-91,7
+84,7
@@
public:
*/
bool GetGlyphMetrics( GlyphInfo* array, uint32_t size )
{
*/
bool GetGlyphMetrics( GlyphInfo* array, uint32_t size )
{
- return mFontClient.GetGlyphMetrics( array, size,
true, mEmojiSiz
e ); // inline for performance
+ return mFontClient.GetGlyphMetrics( array, size,
mGlyphType, tru
e ); // inline for performance
}
protected:
}
protected:
@@
-108,9
+101,8
@@
private:
*/
Metrics( TextAbstraction::FontClient& fontClient )
: mFontClient( fontClient ),
*/
Metrics( TextAbstraction::FontClient& fontClient )
: mFontClient( fontClient ),
- mEmojiSize( 0 )
- {
- }
+ mGlyphType( TextAbstraction::BITMAP_GLYPH )
+ {}
// Undefined
Metrics(const Metrics&);
// Undefined
Metrics(const Metrics&);
@@
-121,8
+113,7
@@
private:
private:
TextAbstraction::FontClient mFontClient;
private:
TextAbstraction::FontClient mFontClient;
-
- int mEmojiSize;
+ TextAbstraction::GlyphType mGlyphType;
};
} // namespace Text
};
} // namespace Text