return internal;
}
-void AtlasGlyphManager::Add( Text::FontId fontId,
- const Text::GlyphInfo& glyph,
+void AtlasGlyphManager::Add( const Text::GlyphInfo& glyph,
const BufferImage& bitmap,
Dali::Toolkit::AtlasManager::AtlasSlot& slot )
{
for ( std::vector< FontGlyphRecord >::iterator fontGlyphRecordIt = mFontGlyphRecords.begin();
fontGlyphRecordIt != mFontGlyphRecords.end(); ++fontGlyphRecordIt )
{
- if ( fontGlyphRecordIt->mFontId == fontId )
+ if ( fontGlyphRecordIt->mFontId == glyph.fontId )
{
fontGlyphRecordIt->mGlyphRecords.PushBack( record );
foundGlyph = true;
{
// We need to add a new font entry
FontGlyphRecord fontGlyphRecord;
- fontGlyphRecord.mFontId = fontId;
+ fontGlyphRecord.mFontId = glyph.fontId;
fontGlyphRecord.mGlyphRecords.PushBack( record );
mFontGlyphRecords.push_back( fontGlyphRecord );
}
const Toolkit::AtlasGlyphManager::Metrics& AtlasGlyphManager::GetMetrics()
{
- mMetrics.mGlyphCount = mFontGlyphRecords.size();
+ mMetrics.mGlyphCount = 0u;
+ for ( std::vector< FontGlyphRecord >::iterator fontGlyphRecordIt = mFontGlyphRecords.begin();
+ fontGlyphRecordIt != mFontGlyphRecords.end();
+ ++fontGlyphRecordIt )
+ {
+ mMetrics.mGlyphCount += fontGlyphRecordIt->mGlyphRecords.Size();
+ }
mAtlasManager.GetMetrics( mMetrics.mAtlasMetrics );
return mMetrics;
}