summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
86202cf)
Change-Id: I09b8c183f0b4231b44d79186a05bbf4fa14ef26c
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
+const std::string EMOJI_FONT_NAME( "SamsungEmoji" ); // Emoticons font family name.
+
/**
* Updates the word size and ascender.
*
/**
* Updates the word size and ascender.
*
Character character = styledText.mText[index];
styledCharacter.mText.Append( character );
Character character = styledText.mText[index];
styledCharacter.mText.Append( character );
- //Choose the right font for the given character and style.
- ChooseFontFamilyName( styledCharacter );
-
- const Font font = Font::New( FontParameters( styledCharacter.mStyle.GetFontName(), styledCharacter.mStyle.GetFontStyle(), styledCharacter.mStyle.GetFontPointSize() ) );
- const Font::Metrics metrics = font.GetMetrics( character );
- const float ascender = font.GetAscender();
-
// Create layout character info.
CharacterLayoutInfo characterLayoutInfo;
characterLayoutInfo.mIsColorGlyph = GlyphImage::IsColorGlyph( character );
DALI_LOG_INFO( gTextViewProcessorLogFilter, Debug::General, " Is color glyph: %s\n", ( characterLayoutInfo.mIsColorGlyph ? "True" : "False" ) );
// Create layout character info.
CharacterLayoutInfo characterLayoutInfo;
characterLayoutInfo.mIsColorGlyph = GlyphImage::IsColorGlyph( character );
DALI_LOG_INFO( gTextViewProcessorLogFilter, Debug::General, " Is color glyph: %s\n", ( characterLayoutInfo.mIsColorGlyph ? "True" : "False" ) );
+ if( characterLayoutInfo.mIsColorGlyph )
+ {
+ styledCharacter.mStyle.SetFontName( EMOJI_FONT_NAME );
+ }
+ else
+ {
+ //Choose the right font for the given character and style.
+ ChooseFontFamilyName( styledCharacter );
+ }
+
+ const Font font = Font::New( FontParameters( styledCharacter.mStyle.GetFontName(), styledCharacter.mStyle.GetFontStyle(), styledCharacter.mStyle.GetFontPointSize() ) );
+ const Font::Metrics metrics = font.GetMetrics( character );
+ const float ascender = font.GetAscender();
+
// Fill Natural size info for current character.
characterLayoutInfo.mHeight = font.GetLineHeight();
characterLayoutInfo.mAdvance = metrics.GetAdvance();
// Fill Natural size info for current character.
characterLayoutInfo.mHeight = font.GetLineHeight();
characterLayoutInfo.mAdvance = metrics.GetAdvance();