X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-toolkit%2Finternal%2Ftext%2Frendering%2Fatlas%2Fatlas-glyph-manager-impl.cpp;h=1053ea9c0731499ef59b91f31fd7fe94538765b7;hp=fea111d77dafabb431ecb7dac0c4493006b0f3ee;hb=ca02242b9d6389f6e02a120afb42645c5f2c9557;hpb=31df2b9472ccbe0ae460a958535be8ef790c96f2;ds=sidebyside diff --git a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp index fea111d..1053ea9 100644 --- a/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp +++ b/dali-toolkit/internal/text/rendering/atlas/atlas-glyph-manager-impl.cpp @@ -117,8 +117,7 @@ AtlasGlyphManagerPtr AtlasGlyphManager::New() 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 ) { @@ -134,7 +133,7 @@ void AtlasGlyphManager::Add( Text::FontId fontId, 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; @@ -146,7 +145,7 @@ void AtlasGlyphManager::Add( Text::FontId fontId, { // 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 ); } @@ -216,7 +215,13 @@ Pixel::Format AtlasGlyphManager::GetPixelFormat( uint32_t atlasId ) 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; }